Consider this sphere. There is a point on the sphere that meets with the positive $z$-axis. Let that be $\{0, 0, 1\}$. (See image in above link)
There are sensors around the axes that can detect rotation of the sphere along that axis. Now $z$-axis sensor detects $-30^{\circ}$ (right hand rule) and $y$-axis detects $-30^{\circ}$. Where will the new point be? What is the math involved?
Well, using polar cordinates we can write the cartecian cordinate through {$x,y,z$} = {$rcos(\theta )sin(\phi),rsin(\theta )sin(\phi),rcos(\phi)$} (this is simple trigometry if you think about it). For {$0,0,1$} we have $r=1$ and $\phi = 0 $. A $-30^\circ$ rotation from the z-axis means that $\phi = \frac{\pi}{6}$ and a $-30^\circ$ from the y-axis corresponds to $\theta = \frac{\pi}{2}+\frac{\pi}{6} = \frac{2\pi}{3}$ which means that the new coordinate is {$sin(\frac{2\pi}{3})sin(\frac{\pi}{6}),cos(\frac{2\pi}{3})sin(\frac{\pi}{6}),cos(\frac{\pi}{6})$}.
In general the formula would be for a sensor at the y-axis {$cos(\frac{\pi}{2} +\frac{a\pi}{180})sin(\frac{b\pi}{180}),sin(\frac{\pi}{2} +\frac{a\pi}{180})sin(\frac{b\pi}{180}),cos(\frac{b\pi}{180})$} = {$-sin(\frac{a\pi}{180})sin(\frac{b\pi}{180}),cos(\frac{a\pi}{180})sin(\frac{b\pi}{180}),cos(\frac{b\pi}{180})$}, where $a$ is the degrees measured from the y axis and $b$ the z-axis
PS: Your figure does not follow the right hand rule!