If you want to pass a pedestrian who is walking along the roadway and an oncoming vehicle is approaching, you should:

If possible, try to only deal with one roadway hazard at a time. If you want to pass a pedestrian but an oncoming vehicle is approaching, slow down and let the vehicle pass. You may then pass the pedestrian if it is safe to do so.
DMV Writen Test