From Wolfram Mathworld[1], we see the following relations:
ρ ^ = cos ϕ x ^ + sin ϕ y ^ ϕ ^ = − sin ϕ x ^ + cos ϕ y ^ z ^ = z ^ {\displaystyle {\begin{aligned}{\hat {\boldsymbol {\rho }}}&=\cos \phi {\hat {\mathbf {x} }}+\sin \phi {\hat {\mathbf {y} }}\\{\hat {\boldsymbol {\phi }}}&=-\sin \phi {\hat {\mathbf {x} }}+\cos \phi {\hat {\mathbf {y} }}\\{\hat {\mathbf {z} }}&={\hat {\mathbf {z} }}\end{aligned}}}
Hence, by making x ^ {\displaystyle {\hat {\mathbf {x} }}} and y ^ {\displaystyle {\hat {\mathbf {y} }}} the subjects, we get:
x ^ = cos ϕ ρ ^ − sin ϕ ϕ ^ y ^ = sin ϕ ρ ^ + cos ϕ ϕ ^ z ^ = z ^ {\displaystyle {\begin{aligned}{\hat {\mathbf {x} }}&=\cos \phi {\hat {\boldsymbol {\rho }}}-\sin \phi {\hat {\boldsymbol {\phi }}}\\{\hat {\mathbf {y} }}&=\sin \phi {\hat {\boldsymbol {\rho }}}+\cos \phi {\hat {\boldsymbol {\phi }}}\\{\hat {\mathbf {z} }}&={\hat {\mathbf {z} }}\end{aligned}}}
Which was what we wanted to show.