In the lecture notes (thermodynamics) the following mathematical identity is often used:
$$ \left(\frac{\partial A}{\partial X}\right)_Z = \left(\frac{\partial A}{\partial X}\right)_Y + \left(\frac{\partial A}{\partial Y}\right)_X\left(\frac{\partial Y}{\partial X}\right)_Z = \left(\frac{\partial A}{\partial X}\right)_Y - \left(\frac{\partial A}{\partial Z}\right)_X\left(\frac{\partial Z}{\partial X}\right)_Y $$
As I understand, this is a standard notation in thermodynamics, see e.g. this or this questions. However, I do not understand the mathematical meaning of the above identity. I am trying to figure out the procedure of how to obtain these derivatives but I am stuck. Could someone please clarify this?