Taken literally, from what you wrote:
$$\frac{dy}{dx}\sin(xy^2) - x^2 = x+5$$
you find $\frac{dy}{dx}$ "in terms of $x$ and $y$" simply by moving $x^2$ to the other side and then dividing through by $\sin(xy^2)$:
$$\begin{align*}
\frac{dy}{dx}\sin(xy^2) - x^2 &= x+5\\
\frac{dy}{dx}\sin(xy^2) &= x^2 + x + 5\\
\frac{dy}{dx} &= \frac{x^2+x+5}{\sin(xy^2)}.
\end{align*}$$
However, I suspect this is not what your problem is. It is unfortunate that you refer to instructions but don't quote them; when you are confused by the statement of a problem, it is best to quote it and then say what confuses you. I fear your confusion has caused you to misreport what the problem actually says.
I suspect that your problem says for you to your find $\frac{dy}{dx}$, in terms of $x$ and $y$, if
$$\sin(xy^2) - x^2 = x+5.$$
This is called implicit differentiation. This equation defines $y$ implicitly as a function of $x$: given any value of $x$, you plug it in, and you find the values of $y$ that make the equation true. Since $y$ is a function of $x$ (though only implicitly), you can ask what the derivative of $y$ with respect to $x$ is.
You start by taking derivatives on both sides, using the Chain Rule. It is important to remember that $y$ itself is a function of $x$, so when you differentiate things like $y^2$, you have to use the chain rule:
$$\frac{d}{dx}y^2 = 2y\frac{dy}{dx}.$$
So, let me do that. First, we use the Chain Rule to differentiate $\sin(xy^2)$; then we will need to find the derivative of $xy^2$, which requires the Product Rule; then we will need the derivative of $y^2$, which requires the Chain Rule (as above). Let's do that:
$$\begin{align*}
\sin(xy^2)-x^2 &= x+5\\
\frac{d}{dx}\Bigl(\sin(xy^2)-x^2\Bigr) &= \frac{d}{dx}\Bigl(x+5\Bigr)\\
\frac{d}{dx}\sin(xy^2) - \frac{d}{dx}x^2 &= \frac{d}{dx}x + \frac{d}{dx}5\\
\cos(xy^2)\left(\frac{d}{dx}xy^2\right) - 2x &= 1\\
\cos(xy^2)\Bigl((x)'y^2 + x(y^2)'\Bigr) -2x &= 1\\
\cos(xy^2)\Bigl(y^2 + x(2yy')\Bigr) - 2x &= 1\\
y^2\cos(xy^2) + 2xy\cos(xy^2)\left(y'\right) -2x &= 1.
\end{align*}$$
The next step is to "solve for $y'$". Just move every term that includes $y'$ to the left hand side, all terms that do not to the right hand side, and then divide through:
$$\begin{align*}
y^2\cos(xy^2) + 2xy\cos(xy^2)\left(y'\right) -2x &= 1\\
2xy\cos(xy^2)y' &= 1 + 2x - y^2\cos(xy^2)\\
y' &= \frac{1 + 2x - y^2\cos(xy^2)}{2xy\cos(xy^2)}.
\end{align*}$$
And that expresses $y'$ in terms of $x$ and $y$, given the original equation.