I've a doubt on problems with manipulation of equations of motion. I'll make an example of a situation I'm confused about.
Let $A$ and $B$ be two points that move on a line with constant speed, $A$ is behind $B$ but it can reach $B$ since $v_A>v_B$. At $t=0$, when the distance between the two points is $d$, $A$ is slowed by $-a$ deceleration. Determine the relation between $v_A,v_B,d,a$ such that $A$ and $B$ do not collide (i.e. $A$ get $B$ with speed equal to $v_B$ and not greater).
My question is on problem like this one, when it is required, among the others, to find an acceleration (deceleration) that gives to a point a particular speed at a given time/position.
In theory what I would do is to write down the two equations of motion of $x_A(t)$ and $x_B(t)$ and try to solve for $t$ the equation $x_A(t)=x_B(t)$, thus I find a time, say $t^*$ at which the position of the points are equal. In this way I can easily impose $v_A(t^*)=v_B$ and get the result. Nevertheless it is quite hard to solve $x_A(t)=x_B(t)$ in the sense that I don't get a easy result.
In fact my book uses another strategy: firstly it finds the time $t^*$ at which $v_A(t^*)=v_B$, then it writes down the equation $x_A(t)=x_B(t)$ and it substitutes the $t^*$ previously found, such that $x_A(t^*)=x_B(t^*)$ and it gets the relation required from this last equation.
I don't understand why this method is correct, and if it is equivalent to the one I proposed. In other words, is it the same to firstly get the time in which $A$ and $B$ have the same position and then impose that in that moment $v_A(t)=v_B$, or firstly find the moment in which $v_A(t)=v_B$ and then impose that in that moment $A$ and $B$ have the same position? Does something guarantees that $A$ reaches the speed $v_B$ only when it is in the same position of $B$?
Similar things happen in the kind of problems I said, to solve the quadratic equation $x_A(t)=x_B(t)$ for $t$ is not the best way, but I don't understand why the other methods (like the one of my textbook) are equivalent.
Thanks a lot for your help