Centroid problem with side ratios Note: The question has two "parts," however, treat the two "parts" like two separate questions.
a) Let $G$ denote the centroid of triangle $ABC$. Let $M$ and $N$ be points on sides $AB$ and $AC$, respectively, so that $M$, $G$, and $N$ are collinear, and $ AM/MB = 5/2 $. Find $AN/NC$.
b) In triangle $ABC$, $AD$ and $BE$ are medians. We also have that $AD$ and $BE$ are perpendicular. If $AC=22$ and $BC=31$, then find $AB$.
Thanks in advance for any help.

Here are figures for helping.
$$(a)\qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad (b)$$


a) for $$A\equiv(3.32,4.42),B\equiv(-2,-0.13),C\equiv(10.08,0.64),M\equiv(-0.47,1.16)$$
I get $AN=4.83,NC=2.92,AN/NC=1.65$
Only changing poition of C to $(6.54,-3.31)$ gives $AN=5.23,NC=3.15,AN/NC=1.66$
Maybe something's wrong.

b) Given:
$$AC=22,BC=31$$
Since D and E are midpoints:
$$\implies BD=31/2,AE=11$$
Now a pretty famous result for centroid is that:
$$\frac{AG}{GD}=\frac{BG}{GE}=\frac{CG}{GF}=\frac21$$
Now let $AD=3x,BE=3y$
So by pythagoreas theorem:
$$\underbrace{(2x)^2}_{AG^2}+\underbrace{y^2}_{GE^2}=\underbrace{121}_{AE^2}\\
\underbrace{(2y)^2}_{BG^2}+\underbrace{x^2}_{GD^2}=\underbrace{961/4}_{BD^2}$$
Solving we get:
$$x^2=\frac{65}4,y^2=56$$
Again:
$$\underbrace{(2x)^2}_{AG^2}+\underbrace{(2y)^2}_{BG^2}=AB^2$$
So $AB=17$.

