I'm currently working on a standard two-body physics problem and am stuck on what I'm assuming is trivial algebra.
For the following expression
$$ L = \frac{1}{2} a\mathbf {\dot r_1}^2 + \frac{1}{2}b\mathbf {\dot r_2}^2 -U(r) \tag{1}\label{1}$$
Let
$$ \left\{ \begin{aligned} \mathbf r_1 = \frac{b \ \mathbf r}{a+b}\\ \mathbf r_2 = \frac{-a \ \mathbf r}{a+b} \end{aligned} \right. $$
Given the three equations, I need to prove the following relation as a part of $\eqref{1}$.
$$ \frac{1}{2} a \bigg(\frac{b \ \mathbf {\dot r} }{a+b} \bigg )^2 + \frac{1}{2} b \bigg(\frac{-a \ \mathbf {\dot r} }{a+b} \bigg )^2 = \frac{1}{2} \bigg ( \frac{ab}{a+b} \bigg ) \mathbf {\dot r}^2 \tag{2}\label{2} $$
My final equation for $L$ should be $$ L = \frac{1}{2} \bigg ( \frac{ab}{a+b} \bigg ) \mathbf {\dot r}^2 -U(r)$$
I've tried to distribute the square, but am left with an expression that does not reduce to the RHS of \eqref{2}. (Unless I'm missing something simple.) I believe there is some property with the vector that I'm not aware of that allows this to work.
Any help would be appreciated, thank you.
$$\frac{ab^2+ba^2}{(a+b)^2} = \frac{ab(b+a)}{(a+b)^2} = \frac{ab}{a+b}$$