<s>[INST] Help in understanding a simple proof. Let $Ax + By + C = 0$ be a general equation of a line and $x\cos \alpha + y\sin \alpha - p = 0$ be the normal form of the equation. 
Then,
$${-p\over C } = { \cos \alpha\over A} = { \sin\alpha\over B}\tag{1}$$
$${p\over C } = { \cos \alpha\over -A} = { \sin\alpha\over -B} \tag{2}$$
$${p\over C } = { \cos \alpha\over -A} = { \sin\alpha\over -B} = {\sqrt{\sin^2 \alpha + \cos^2 \alpha}\over \sqrt{A^2 + B^2}} = {1\over \sqrt{A^2 + B^2}} \tag{3}$$
$$\therefore \bbox[ #FFFDD0, 10px, Border:2px solid #DC143C]{p = {C\over \sqrt{A^2 + B^2}}, \cos \alpha = {-A\over \sqrt{A^2 + B^2}},\sin\alpha = {-B\over \sqrt{A^2 + B^2}}} $$
I did not get the $(3)$ part. Where does $\displaystyle{\sqrt{\sin^2 \alpha + \cos^2 \alpha}\over \sqrt{A^2 + B^2}}$ come from ?
 [/INST] $$
{p\over C } = { \cos \alpha\over -A} = { \sin\alpha\over -B} 
\\
\implies \frac{p^2}{C^2}=\frac{\cos^2(\alpha)}{A^2}=\frac{\sin^2(\alpha)}{B^2}
$$
If 
$$
\frac{a}{b}=\frac{c}{d}=k
\\
\implies a=bk, c=dk
$$
So the value of :
$$
\frac{a+c}{b+d}=\frac{bk+dk}{b+d}=\frac{k(b+d)}{b+d}=k=\frac{a}{b}=\frac{c}{d}
$$
Simply put, in a proportion of two or more equal ratios, the sum of the antecedents divided by the sum of the consequents is equal to any one of the ratios.
In the same way :
$$
\frac{p^2}{C^2}=\frac{\cos^2(\alpha)}{A^2}=\frac{\sin^2(\alpha)}{B^2}={{\sin^2 \alpha + \cos^2 \alpha}\over {A^2 + B^2}}
$$
Hence :
$$
\frac{p}{C}={\sqrt{\sin^2 \alpha + \cos^2 \alpha}\over \sqrt{A^2 + B^2}}
$$
</s>