I was reading this article here and i understand the equation until the part when he replace the r with x or y ,, so i know that cos = adj/hyp and sin = opp / hyp ,,, and to calc both values we need "r" , so who you know the vale of new "x,y" from the old value of "x,y" wihtout the "r" ?
Article Link : http://www.sunshine2k.de/articles/RotationDerivation.pdf

That last step used the substitution $$ x = r \cos \alpha \\ y = r \sin \alpha $$ The whole equation seems to derive the $x$-coordinate of the vector $(r,0)^t$ rotated first by angle $\alpha$ then by $\beta$ around the $z$-axis, which is the same as rotating it by $\alpha + \beta$.