Two vectors of lengths $a$ and $b$ make an angle $\theta$ with each other when placed tail to tail. Show that the magnitude of their resultant is : $$r = \sqrt{ a^2 + b^2 +2ab\cos(\theta)}.$$
I understand that if we placed the two vectors head-to-tail instead of tail-to-tail, the Law of Cosines dictates that the resultant would be: $$\sqrt{ a^2 + b^2 -2ab\cos(\theta)}$$
However, In the situation actually described, the direction of vector $a$ has been reversed, which changes the sign of $2ab$ without changing the sign of $a^2$. But how do I prove that mathematically?