Let $a = x^2$ and $b=y^2$. Then, your problem is equivalent to choosing $a,b\geq 0$ to maximize
$$
g(a,b) = \frac{m_1 a^2 + m_2 b^2 + a + b -ab}{a+b-m a b}.
$$
This should allow you to get rid of the fourth order terms in the derivative steps.
However, oftentimes, this problem results in a maximized value of $\infty$. For instance, if $m_1$ is positive, then let $b=0$ and $g \rightarrow \infty$ as $a\rightarrow \infty$. Same for when $m_2> 0$.
In other cases, the derivative of this function w.r.t. $a$ is
$$
\frac{a m_1 (a (-b) m+a+2 b)+b^2 \left(m_2 (b m-1)+m-1\right)}{(a (-b) m+a+b)^2}.
$$
At the optimum you would need this to be equal to $0$, i.e. you would only look at the numerator,
$$
a m_1 (a (-b) m+a+2 b)+b^2 \left(m_2 (b m-1)+m-1\right) = 0.
$$
Similarly, derivative with respect to $b$ would require
$$
\frac{a^2 (m-1)+a^2 m_1 (a m-1)+b m_2 (a (-b) m+2 a+b)}{(a (-b) m+a+b)^2} = 0,
$$
i.e.
$$
a^2 (m-1)+a^2 m_1 (a m-1)+b m_2 (a (-b) m+2 a+b) = 0.
$$
These two equalities should give you an idea about where you would find the solution.