In the first equation, all terms involving \(y\) or its derivatives appear linearly:
\begin{gather*}
\underset{\overline{\text{linear}}}{\vphantom{\frac11}\color{BurntOrange} y^{(5)}} +
\underset{\overline{\text{linear}}}{\frac{1}{x^2} \color{BurntOrange} y'} +
\underset{\overline{\text{linear}}}{5 \color{BurntOrange} y} =\
\underset{\overline{\text{linear}}}{\ln x}
\end{gather*}
So the equation is linear.
In the second equation, the term \(\frac{m P'}{P}\) is nonlinear, since \(P\) appears in both the numerator and denominator:
\begin{gather*}
\underset{\text{linear}}{\underline{\color{BurntOrange} P^{(6)}}} +
\underset{\overline{\text{nonlinear}}}{\frac{m \color{BurntOrange} P'}{\color{BurntOrange} P}} =\
\underset{\text{linear}}{(m - 1)^2}
\end{gather*}
This makes the entire equation nonlinear.