Really stuck - Proportionally control 2 motors from 1 data range

I may need the focus point to be able to move forward and back at some point and wanted to build in some redundancy.

Imagine the IR light moves along its wall (X) axis stopping at predetermined points and at that given point the central object will move forward to engage or action with objects on the wall before returning to its central position. Initially just following the IR would be a start but as I mentioned I am finding PID motor control (or this level of motor control) beyond my programming ability. I have tried to use various different algorithms but to no avail.