From transfer function to frequency response
This is just answering one part of your question: 


  I don't quite understand the last part. How does he calculate X and ϕ


This is just applying the trigonometric identity
$$\sin\left(\alpha + \beta\right)=\sin\alpha\cos\beta + \cos\alpha\sin\beta$$
with \$\alpha=\omega{}t\$ and \$\beta=\phi\$.

Using this identity on the r.h.s. gives
$$X\sin\left(\omega{}t+\phi\right)=X\left(\sin{}\omega{}t\cos\phi+\cos\omega{}t\sin\phi\right)$$
so our equation becomes
$$\frac{A}{\omega}\sin\left(\omega{}t\right)+B\cos\left(\omega{}t\right)=X\left(\sin{}\omega{}t\cos\phi+\cos\omega{}t\sin\phi\right)$$

Which we can break into two parts,
$$\frac{A}{\omega}\sin\left(\omega{}t\right)=X\cos\phi\sin{}\omega{}t$$
and
$$B\cos\left(\omega{}t\right)=X\sin\phi\cos\omega{}t$$

So,
$$\frac{A}{\omega} = X\cos\phi$$
and
$$B=X\sin\phi$$

From there you should be able to get the conclusions from your source.