I have the following Figure and equations:
$$ \rho = \arctan(\frac{Ax}{\sqrt{Ay^{2} + Az^{2}}}) \tag{1} $$
$$ \phi = \arctan(\frac{Ay}{\sqrt{Ax^{2} + Az^{2}}}) \tag{2} $$
$$ \theta = \arctan(\frac{\sqrt{Ax^{2} + Ay^{2}}}{Az}) \tag{3} $$
The body on the Figures is a tri-axial accelerometer sensor, which measures accelaration in meters/seconds².
The goal is to calculate the tilt of the following angles using acceleration values:
- ρ: angle of the X-axis relative to the ground (orange line);
- Φ: angle of the Y-axis relative to the ground (orange line);
- θ: angle of the Z-axis relative to the gravity (green line).
Could someone explain how to find equations 1,2 and 3 from the figure above?
Source of the equations and figure: https://www.thierry-lequeu.fr/data/AN3461.pdf
There is another similar and more detailed source that uses the same equations, but I also could not understand how to find them: https://www.analog.com/en/app-notes/an-1057.html
Thanks in advance.

In the following diagram, you can obtain the angle $\theta$ using the formula $$ \theta = \arctan (o/a)\tag{1} $$ where $o$ denotes the length of the side of the triangle opposite $\theta$, and $a$ denotes the length of the site adjacent to $\theta$. You can calculate the length of the other side, called the hypotenuse, using Pythagoras's theorem, $h^2=o^2+a^2$, which becomes $h=\sqrt{o^2+a^2}$.