Very nice
And just to finish off by showing you how the result of the substitution we made came to be:
[tex]a\cdot\cos\theta+b\cdot\sin\theta[/tex][tex]=R\sin\left(\theta+\phi\right)[/tex]
[tex]RHS=R(\sin\theta\cos\phi+\cos\theta\sin\phi)[/tex]
Since we want to solve for [itex]\theta[/itex], we can equate the coefficients of [itex]\cos\theta[/itex] from each side, and also for [itex]\sin\theta[/itex].
[tex]a\cdot\cos\theta \equiv R\cos\theta\sin\phi[/tex]
[tex]a = R\sin\phi[/tex]
and
[tex]b\cdot\sin\theta \equiv R\sin\theta\cos\phi[/tex]
[tex]b=R\cos\phi[/tex]
So now we have these two equations in 2 unknowns (R and [itex]\phi[/itex]) and can thus solve them simultaneously. We can solve for [itex]\phi[/itex] by dividing the first equation by the second to get
[tex]\frac{a}{b}=\tan\phi[/tex]
[tex]\phi=\tan^{-1}\frac{a}{b}[/tex]
and plugging this back into the first or second equation, we get
[tex]a=R\sin\left(\tan^{-1}\frac{a}{b}\right)[/tex]
and by playing around with this and applying trig substitutions (I myself prefer using a right triangle), you can determine that
[tex]\sin(\tan^{-1}x)=\frac{x}{\sqrt{x^2+1}}[/tex]
And so
[tex]R=\frac{a\sqrt{x^2+1}}{x}[/tex]
[tex]=\frac{a\sqrt{\frac{a^2}{b^2}+1}}{\frac{a}{b}}[/tex]
[tex]=\frac{\frac{a}{b}\sqrt{a^2+b^2}}{\frac{a}{b}}[/tex]
[tex]=\sqrt{a^2+b^2}[/tex]
as required.