<s>[INST] Find two numbers, $x,y$ whose sum is $35$ and $x^2y^5$ is maximum. 
Find two numbers, $x,y$ whose sum is $35$ and $x^2y^5$ is maximum.

My answer:
$$x+y=35$$
$x^2y^5$ is maximum
$$y=35-x$$
$$\frac{d}{dx} x^2(35-x)^5$$
Which rule to apply here after? I reached:
$$(35-x)^4(-5x^2+(35-x)2x)=0$$
Either $(35-4x)^4 =0$ or $x^2-7=0$
 [/INST] $$x+y=35$$
$$y=35-x$$
Then plug this into the function you want to maximize to create a single variable function.  So we want to maximize $$f(x)=x^2(35-x)^5.$$
To find all local extremes, we need to take the derivative, set it equal to $0$, and solve for $x$.  Using the product rule, we get
$$f'(x)=2x\cdot (35-x)^5+x^2\cdot 5(35-x)^4\cdot (-1)$$
Now set it equal to $0$ and we can factor out a $x(35-x)^4$:
$$0=2x\cdot (35-x)^5+x^2\cdot 5(35-x)^4\cdot (-1)$$
$$0=x(35-x)^4\Big[2(35-x)-5x\Big]$$
Now we have 3 different factors.  We can set each one equal to 0 and solve separately.
Factor 1:
$$x=0$$
Factor 2:
$$(35-x)^4=0$$
$$35-x=0$$
$$x=35$$
Factor 3:
$$2(35-x)-5x=0$$
$$70-2x-5x=0$$
$$70-7x=0$$
$$70=7x$$
$$x=10$$
Now we need to plug each of these local extrema back into $f(x)$ to see which is the absolute max.
$$f(0)=(0)^2(35-0)^5=0$$
$$f(35)=(35)^2(35-35)^5=0$$
$$f(10)=(10)^2(35-10)^5=976,562,500$$
Clearly $x=10$ gives the maximum.  Now we just need to figure out what $y$ is when $x=10$.
$$y=35-x$$
$$y=35-10$$
$$y=25$$
So, $x=10$ and $y=25$ are the numbers whose sum is 35 and maximize $x^2y^5$.
Here's a link to a site with a little more detail to explain a similar problem.  The function you derive in this other example is easier than the one we had to do here, but the concept is the same.
https://jakesmathlessons.com/derivatives/solution-find-two-numbers-whose-sum-is-23-and-whose-product-is-a-maximum/
</s>