I have this system to solve:
$$x'=x; \ \ \ y'=-y+x^2$$
If I solve it the "normal" way using a parameter $t$ such that $x = x(t); y = y(t)$, I can obtain it by solving the $x'$ equation first and use this for the $y'$ equation. This gives:
$$x(t) = C_1 e^t; \ \ y(t)=C_2e^{-t}+\frac{C_1^2}{3}e^{2t}$$
Now, the professors said we can eliminate $t$ and obtain $y=y(x)$
I am completely lost on how to do it, but I found it using my results above.
We can find that $$y(t) = C_2 e^{-t} + \frac{C_1^2}{3}e^{2t}= \frac{C_1 C_2}{x(t)}+\frac{x(t)^2}{3} = y(x)=y(x(t))$$
But, I should be able to obtain it by integrating, nevertheless the only thing I can come up with is
$$\frac{y'}{x'} = \frac{\mathrm{d} y}{\mathrm{d} x} = \frac{-y + x^2}{x}$$
But I can't integrate this in any way to obtain the result I got above.
Your equation $\frac{dy}{dx} = \frac{-y+x^2}{x}$ can be turned into "differential" form:
$$ xdy + (y-x^2)dx =0$$
This is of the form:
$$ M(x,y)dx + N(x,y)dy =0$$
Check for exactness:
$M_y(x,y)= \frac{\partial M}{\partial y} =1=\frac{\partial N}{\partial x}=N_x(x,y)$
Since this equation is exact, we can use the method of exact equations.
Now, you can follow the standard "textbook" recipe to find the solution, or you can just do this:
$$ \int xdy +(y-x^2)dx =K \implies xy+yx-\frac{x^3}{3} = K \implies 2xy = K +\frac{x^3}{3} \implies y = \frac{x^2}{3}+\frac{K}{2x} = \frac{x^2}{3} + \frac{L}{x}$$, where $L = \frac{K}{2}$ is a constant.This general solution is of the form that you originally got.