M and N are midpoints of BC and AC. We know that tanφ = m.

Find tanα and tanβ. (α and β are like usual the angles in the triangle)
On
Let side $AC=b$ and side $BC=a$. Let angle $CAM=\theta$.
Drop perpendiculars from $G$ onto sides $AC$ (to point $X$) and to $BC$ (to point$Y$). $GY$ and $GX$ have lengths $\frac a3$ and $\frac b3$ respectively due to the property that the centroid $G$ divides the median $AM$ or $BN$ in the ratio $2:1$.
Then, in triangle $ACM$ we have $$\tan\theta=\frac{\frac a3}{\frac{2b}{3}}=\frac{a}{2b}$$
We also have in triangle $GXB$ $$\tan(\theta+\psi)=\frac{\tan\theta+m}{1-m\tan\theta}=\frac{\frac{2a}{3}}{\frac b3}=\frac{2a}{b}$$
$$\implies \frac{a}{2b}+m=\frac{2a}{b}(1-\frac{ma}{2b})$$
Now write $\tan A=\frac ab=k$. Note that $\tan B=\frac1k$.
Therefore $k$ satisfies the quadratic $$2mk^2-3k+2m=0$$
The roots are $$k=\frac{3\pm\sqrt{9-16m^2}}{4m}$$
Furthermore it is simple to show that if $k=\tan A=\frac{3+\sqrt{9-16m^2}}{4m}$, then $\tan B=\frac 1k=\frac{3-\sqrt{9-16m^2}}{4m}$
Let $[ABC]$ be the area of $\triangle ABC$, $|BM|=|MC|=a$, $|AN|=|NC|=b$, $|AB|=c$, $\tan\phi=m$.
Then \begin{align} c&=2\sqrt{a^2+b^2} ,\\ [CAB]&=2ab ,\\ [CNM]&=\tfrac12ab ,\\ [ABMN]&=\tfrac34[CAB]=\tfrac32ab ,\\ [ABMN]&= \tfrac12\,|AM|\cdot|BN|\,\sin\phi \end{align}
\begin{align} |AM|&=\sqrt{a^2+4b^2} ,\\ |BN|&=\sqrt{4a^2+b^2} ,\\ [ABMN]&= \tfrac12\,\sqrt{(a^2+4b^2)(4a^2+b^2)}\,\sin\phi =\tfrac32ab ,\\ (a^2+4b^2)(4a^2+b^2)\sin^2\phi &=9a^2b^2 ,\\ \sin^2\phi&=\frac{9a^2b^2}{(a^2+4b^2)(4a^2+b^2)} \\ \frac{m^2}{m^2+1} &=\frac{9(\tfrac ab)^2}{((\tfrac ab)^2+4)(4(\tfrac ab)^2+1)} . \end{align}
\begin{align} \tan\alpha,\ \tan\beta &= \frac{3\pm\sqrt{9-16\,m^2}}{4m} = \frac{3}{4m}\pm\sqrt{\left(\frac3{4m}\right)^2-1} . \end{align}