<s>[INST] Solving the given system of equations 
$$\frac{x^2}{y} + \frac{y^2}{x} = 6$$
$$\frac{x}{y} + \frac{y}{x} = 4$$

I got $x^3 + y^3 = 6xy = (x+y)^2$ which I simplified to $x^2 - xy + y^2 = x + y$ and I'm not sure what to do now. Please help.
 [/INST] We are given that $$\frac{x^2}{y} + \frac{y^2}{x} = 6$$
$$\frac{x}{y} + \frac{y}{x} = 4$$
Consider the expression $(x+y)\left(\frac{x}{y}+\frac{y}{x}\right)$:
$$(x+y)\left(\frac{x}{y}+\frac{y}{x}\right)=x+y+\frac{x^2}{y}+\frac{y^2}{x}$$
so
$$(x+y)\left(\frac{x}{y}+\frac{y}{x}-1\right)=\frac{x^2}{y}+\frac{y^2}{x}$$
But using the initial conditions we see that
$$3(x+y)=6\implies x+y=2\implies x=y-2$$
which can be subsituted into your equations to provide solutions for $x$ and $y$.
This is a bit more of an experimental solution than the other answers; the expression considered intially is not necessarily obvious. Often though some fiddling around with expressions like that is useful.
I hope that helps :)
</s>