Using the method of Lagrange's Multipliers:
Let our $n $ variables $x,y,\cdots,l $. Let $$f (x,y,z,\cdots, l) =x^my^n\cdots l^t $$ subject to the condition $\phi (x,y,\cdots l)= x+y+\cdots + l=c $. Consider the auxiliary function $$F (x,y,\cdots,L,\lambda) = x^my^n\cdots l^t +\lambda (x+y+\cdots +l-c)=0$$ For extreme values $$\frac {\partial F}{\partial x} =mx^{m-1}y^n\cdots l^t +\lambda =0 \tag {1}$$ $$\frac {\partial F}{\partial y} =ny^{n-1 }x^m\cdots l^t +\lambda =0 \tag {2}$$ $$\vdots $$ $$\frac {\partial F}{\partial l} =tl^{t-1} \cdots x^my^n +\lambda =0 \tag {n}$$ We compare $(1) $ with $x (1)+y (2)+\cdots l (n) $ to get the value of $\lambda $. Then it becomes clear that $$\frac {x}{m}=\frac {y}{n}=\cdots =\frac {l}{t} $$ is fulfilled by these extreme values.
Hope it helps.