How do I wire a new ceiling fan to the wiring in the picture?
You get some colored tape. You see the left white wire, the one spliced to the black wire; just below the wirenut you wrap it 3-4 times with red tape.
You see the right white wire, the one the one nutted with the black/white wire… you wrap it 3-4 times with some blue tape.
When you mark a wire like that, that becomes its new color.
De-energize the circui.
Fan neutral(s) go to the white wire (on the far right) which is still not marked, that being your supply.
New fan will have black, striped, blue or red wires – don’t know which. The booklet will say. Which ever one goes to the fan light, hook that up to the red wire. (it’s a white wire that you taped red).
Energize the circuit (you had it off so far, right?) and go see which switch operates the light. The other switch will do nothing. Mark the switch that now works with red tape. Mark the other one blue.
De-energize the circuit, remove the switch plate cover, and pull the switch out – enough to tape 3-4 wraps of red tape on the white wire going to the red switch, and blue to the blue switch. Reinstall the switch and cover plate.
Now you can think about which switches you want operating the light, and which the fan. From here it’s fairly obvious: connect the “hot” wire for the light, to the color of wire corresponding to that switch. Do the same with the fan.