The speed of y axis is 2, the speed of GA is 1, and a is a constant.
When P is higher than G, time =(a-b)/2+ root sign (a*a+6*6), and when this time is a=b, the value of this formula is the smallest, which means that P coincides with G, and when P is lower than G, (b-a)/2+ root sign (B * B+6 *).