OK the air handler should have the following control wires from factory:
Red,Green,White(possibly a brown) and Blue.
( Red is power,green is fan,white and brown if you have one is heat kit and blue is common.)
Outdoor unit should have the following:
Blue, White,Orange,Yellow and Red
(Blue is common,White sends signal to heat kit in defrost mode,Orange controls reversing valve,Yellow controls contactors and Red is power.
So heter is what we want:
1. A wire from R at thermostat to RED in air handler and RED in outdoor unit
2.A wire from C at thermostat to BLUE in air handler and BLUE in outdoor unit
3.A wire from O at thermostat directly to ORANGE in outdoor unit
4.A wire from Y at thermostat directly to Yellow in outdoor unit
5.A wire from Aux at thermostat to white, brown if you have one in air handler and white in outdoor unit
6. A jumper at thermostat from E to Aux
7.A wire from G at thermostat to GREEN in air handler.
Now with this stated it makes no difference what color wires you have ran in between the units as field installed as long as they connect to these wires in units.
Let me know if you are able to decipher this and any questions you have.
Since I see you have two reds and 2 whites at thermostat you are going to have to figure which is which in order to know where to put them.
The best thing to do is to run new wires between units containing all of the colors named, but it is possible to use what we have