How to solve $xy'y^2=x^2+y^3$? $$xy'y^2=x^2+y^3$$
In my problems book it is covered as "linear non-homogeneous" equation, but I was not able to bring it to canonical form like
$$y'+yp(x) = q(x)$$
is there any trap about it?

Since you seem to know how to solve those in the 'canonical form' you mentioned, I thought it would be useful to provide an answer showing that your ODE can be put into that form. Consider an ODE in the following form:
$$y'+P(x)y=Q(x)y^n$$
Where $n\in \mathbb{R}\setminus\{0,1\}$. Such an ODE is called a Bernoulli Differential Equation. In general, such can be reduced to the form you mentioned using the substitution $z=y^{1-n}$. Your ODE can be written in that form:
$$y'-\frac{1}{x}y=xy^{-2}$$

Hence, in your case, we clearly see that $n=-2$, thus the change of variable $z=y^3$ seems reasonable. Hence $z'=3y^2y'$ by the chain rule and let's now apply this substitution to your original ODE:
$$xy^2y'=x^2+y^3 \implies x\cdot \frac{z'}{3}=x^2+z$$
Which is in the form you mention, after dividing both sides by $\dfrac{x}{3}$ and rearranging:
$$z'-\frac{3}{x}\cdot z=3x$$
And this, you know how to solve.
