The white wire (from irrigation bundle, not irritrol system) should be connected to one of the C terminals (where your black wire is connected now). You may have to use some sort of extension, because it is trimmed rather short at this time.
Move the black wire to the M terminal (you do seem to have a master valve), enable master valve in settings.
The second picture (Irritrol) is a wireless rain sensor. You don’t have to use it, but if you do, connect Red wires to SC and SP terminals (which one to which, does not matter), connect white cable to SC terminal (you will have two wires connected to SC terminal, I recommend you twist them together before inserting them in) and brown wire to S1 terminal.
Enable rain sensor on S1 terminal. Make sure you DO NOT use a yellow wire, rachio is not compatible with normally open (NO) wire.
P.S. I’ve made a correction, it should have been white wire (not gray as I’ve originally thought) which should have been connected to the C terminal.