Finding the tangent line of curve $x^2y^2+5xy=14$ at $(2,1)$

tangent line

I want to check if my work is correct.

Find the equation of the tangent line to the curve at (2, 1)$$𝑥^2𝑦^2 + 5𝑥𝑦 = 14(1) $$
solution:

The tangent is a straight line so it will be of the form:
$y=ax+b(2)$

Where $a$ is the slope of the equation of the tangent to the curve $(1)$ at point $(2,1)$, and line $y=ax+b$ passes through
$(2,1)$.
So that, we can get a by finding the $1st$ $\frac{\mathrm{d}y}{\mathrm{d}x}$ derivative as this is the gradient of the line.
Applying Implicit Differentiation for $(1)$:
\begin{alignat*}{1}
2xy^2+x^2y\frac{\mathrm{d}y}{\mathrm{d}x}+5y+5\frac{\mathrm{d}y}{\mathrm{d}x}=0
\end{alignat*}

So, at $(2,1)$ it reduces to:
\begin{alignat*}{1}
&\ 9+9\frac{\mathrm{d}y}{\mathrm{d}x}=0\\
\Leftrightarrow &\ \frac{\mathrm{d}y}{\mathrm{d}x}=-1\\
\Leftrightarrow &\ a=-1
\end{alignat*}

$(2)$ become:
$y=-x+b$.
$(2)$ passes through $(2,1)$:
\begin{alignat*}{1}
&\ 1=-2+b\\
\Leftrightarrow &\ b=3
\end{alignat*}

Thus, the line $y=-x+3$ is a equation of the tangent line to the curve $x^2y^2+5xy=14$ at
$(2,1)$
Sol2:
\begin{align}
𝑥^2𝑦^2 + 5𝑥𝑦 = 14
\end{align}

Best Answer

$$2xy^2 + 2x^2yy' + 5y + 5xy'=0$$ $$y'=-\frac{2xy^2+5y}{2x^2y+5x}$$ $$m=y'(2;1)=-\frac{1}{2}$$ and the equation of tangent line at the point $(2;1)$ is $y=-\frac{1}{2}x+2$