This sort of derivation is done by differentiating the coupled equations and then substituting the results back ininto the original, undifferentiated equations to eliminate the undesired variables.
In this case, if I waswere asked to reproduce the last equation, I would:
- Isolate $q$ from the first equation.
- Differentiate this equation twice to find expressions for $\partial^2 q/\partial t^2$ and $\partial^2 q/\partial x^2$ in terms of the derivatives of $w$ and $\phi$.
- Write down the right-hand side of the desired equation in terms of the derivatives of $w$ and $\phi$.
- Cancel out as many terms as I can and hope that the I don't make a sign error somewhere.
Note that for a homogenous and isotropic beam, all of the beam properties are constant with respect to $x$, which makessimplifies the derivatives simplydifferentiation somewhat.