<s>[INST] Proving $a\cos x+b\sin x=\sqrt{a^2+b^2}\cos(x-\alpha)$ 
Show that $a\cos x+b\sin x=\sqrt{a^2+b^2}\cos(x-\alpha)$ and find the correct phase angle $\alpha$.

This is my proof.

Let $x$ and $\alpha$ be the the angles in a right triangle with sides $a$, $b$ and $c$, as shown in the figure. Then, $c=\sqrt{a^2+b^2}$. The left-hand side is $a\cos x+b\sin x=\frac{ab}{c}+\frac{ab}{c}=2\frac{ab}{c}$. The right-hand side is $\sqrt{a^2+b^2}\cos(x-\alpha)=c\left(\cos{x}\cos{\alpha}+\sin{x}\sin{\alpha}\right)=c\left(\frac{ab}{c^2}+\frac{ab}{c^2}\right)=2\frac{ab}{c}$.
Is my proof valid? Is there a more general way to prove it?
For the second part of the question, I think it should be $\alpha=\arccos\frac{a}{\sqrt{a^2+b^2}}=\arcsin\frac{b}{\sqrt{a^2+b^2}}$. Is this correct?
 [/INST] You are largely correct. However you could prove the first part in a very simple way:
We can write $$P= a\cos x+b\sin x =\sqrt {a^2+b^2} \left[\frac {a}{\sqrt {a^2+b^2}}\cos x+\frac{b}{\sqrt {a^2+b^2}}\sin x \right] $$ Now we can take $\frac{a}{\sqrt {a^2+b^2}} $ as $\cos \alpha $ giving us $$P=\sqrt {a^2+b^2}[\cos \alpha \cos x+\sin \alpha \sin x]=\sqrt{a^2+b^2}\cos (x-\alpha) $$ And also $$\alpha =\arccos \frac {a}{\sqrt {a^2+b^2}} $$ which I think maybe a small typo in your calculation.
You need not prove the first part with the help of a triangle but your approach is fine. Hope it helps.
</s>