Tricky question on polynomials 
For any real numbers $x$ and $y$ satisfying $x^2y + 6y = xy^3 +5x^2 +2x$, it is known that $$(x^2 + 2xy + 3y^2) \, f(x,y) = (4x^2 + 5xy + 6y^2) \, g(x,y)$$
  Given that $g(0,0) = 6$, find the value of $f(0,0)$.

I have tried expressing $f(x,y)$ in terms of $g(x,y)$. But seems that some tricks have to been done to further on the question. Can anyone figure out the expression?
 A: The given equation implies $$\frac{y}{x} = \frac{y^2 + 5x + 2}{x^2 + 6}$$ so we can rewrite the expression for $f/g$ as $$\frac{4 + 5(y/x) + 6(y/x)^2}{1+2(y/x) + 3(y/x)^2} = \frac{4(x^2 + 6)^2 + 5(y^2 + 5x+2)(x^2 + 6) + 6(y^2 + 5x+2)^2}{(x^2+6)^2 + 2(y^2 + 5x+2)(x^2 + 6) + 3(y^2 + 5x+2)^2}$$
Assuming $f$ and $g$ are supposed to be continuous, we see that (taking the limit along the curve defined by the equation) this rewritten expression gives $$\frac{f(0,0)}{6}=\frac{f(0,0)}{g(0,0)} = \frac{36\cdot 4 + 5\cdot 12 + 24}{36+24+12} = \frac{228}{72} = \frac{19}{6} \implies f(0,0) = 19$$
A: Note that:
$$x^2y + 6y = xy^3 +5x^2 +2x \Rightarrow y=\frac{x(y^3 +5x +2)}{x^2+6}.$$
Hence:
$$\begin{align}(x^2 + 2xy + 3y^2) \, f(x,y) &= (4x^2 + 5xy + 6y^2) \, g(x,y) \Rightarrow \\
\lim_{x,y\to 0} \frac{f(x,y)}{g(x,y)}&=\lim_{x,y\to 0} \frac{(8x+5y)^2+71y^2}{16((x+y)^2+2y^2)}\\
\frac{f(0,0)}{g(0,0)}&=\lim_{x,y\to 0} \frac{\left(8\color{red}x+5\cdot \frac{\color{red}x(y^3+5x+2)}{x^2+6}\right)^2+71\cdot \frac{\color{red}{x^2}(y^3+5x+2)^2}{(x^2+6)^2}}{16\left(\left(\color{red}x+\frac{\color{red}x(y^3+5x+2)}{x^2+6}\right)^2+2\cdot \frac{\color{red}{x^2}(y^3+5x+2)^2}{(x^2+6)^2}\right)}\\
\frac{f(0,0)}{6}&=\lim_{x,y\to 0} \frac{\left(8+5\cdot \frac{y^3+5x+2}{x^2+6}\right)^2+71\cdot \frac{(y^3+5x+2)^2}{(x^2+6)^2}}{16\left(\left(1+\frac{y^3+5x+2}{x^2+6}\right)^2+2\cdot \frac{(y^3+5x+2)^2}{(x^2+6)^2}\right)}\\
&=\frac{\left(8+\frac{10}{6}\right)^2+71\cdot \frac{4}{6^2}}{16\left(\left(1+\frac26\right)^2+2\cdot\frac{4}{6^2}\right)}=\frac{3648}{1152}\\
f(0,0)&=19.\end{align}$$
