Distance travelled is dependent on time.
-y) = cos x cos y + sin x sin y becomes, in terms of sign,
cos(x-y) = (Note that cos(x-y) = cos x cos y + sin x sin y.
If angle x is in the fourth quadrant, then sin x is positive and cos x is negative.
If angle y is in the first quadrant, then sin y is positive and cos y is positive.
Then cos(x-y) becomes, in terms of sign:
(-)(+) + (+)(+), or
(-) + (+)
This would be positive, overall, if cos x cos y < sin x sin y.
This is the process of completing the square.
Keep this equation in mind:

Basically, to make this a perfect square trinomial, you take half of b and square that value. This will make it so you can compress the left side of the equation into

depending on the sign in the middle of the original equation.