Let $C$ be the curve of intersection of the plane $x+y-z=0$ and the ellipsoid $$\frac{x^2}4+\frac{y^2}5+\frac{z^2}{25}=1$$ Find the points on $C$ which are farthest and nearest from the origin
When dealing with constraints I tried to consider the function $$F(x,y,z)=x^2+y^2+z^2-\lambda(x+y-z)-\mu\left(\frac{x^2}4+\frac{y^2}5+\frac{z^2}{25}-1\right)$$ However, I cannot solve this equation after differentiating respect to $x,y,z$ because it yields three equations with no common solution.
The system of equations are $$2x=\lambda+\frac{\mu x}{2}$$ $$2y=\lambda+\frac{2\mu y}{5}$$ $$2z=-\lambda+\frac{2\mu z}{25}$$ How would I approach this problem, thanks.

Since I am lazy to do it by hands, I give you the sage code.
you shall get
$\left\{z : \frac{5}{646} \, \sqrt{2} \sqrt{17} \sqrt{19}, x : \frac{20}{323} \, \sqrt{2} \sqrt{323}, y : -\frac{35}{646} \, \sqrt{2} \sqrt{17} \sqrt{19}, \mbox{lam} : \frac{75}{17}, \mu : -\frac{70}{5491} \, \sqrt{2} \sqrt{17} \sqrt{19}\right\} 4.41176470588$ $ \left\{z : -\frac{5}{646} \, \sqrt{2} \sqrt{17} \sqrt{19}, x : -\frac{20}{323} \, \sqrt{2} \sqrt{323}, y : \frac{35}{646} \, \sqrt{2} \sqrt{17} \sqrt{19}, \mbox{lam} : \frac{75}{17}, \mu : \frac{70}{5491} \, \sqrt{2} \sqrt{17} \sqrt{19}\right\} 4.41176470588$ $\left\{z : \frac{5}{19} \, \sqrt{5} \sqrt{19}, x : \frac{2}{19} \, \sqrt{5} \sqrt{19}, y : \frac{3}{19} \, \sqrt{5} \sqrt{19}, \mbox{lam} : 10, \mu : -\frac{6}{19} \, \sqrt{5} \sqrt{19}\right\} 10.0$ $\left\{z : -\frac{5}{19} \, \sqrt{5} \sqrt{19}, x : -\frac{2}{19} \, \sqrt{5} \sqrt{19}, y : -\frac{3}{19} \, \sqrt{5} \sqrt{19}, \mbox{lam} : 10, \mu : \frac{6}{19} \, \sqrt{5} \sqrt{19}\right\} 10.0 $
So you have two points where f has minimum 4.411 and two points where you have the maximum 10.