The sum of two numbers is 30.

Call these numbers and .

Then .

It is important to note that .

The product of one number and the square of the other is obviously , which you can write as .

You want this product to be a maximum.

So .

Find the derivative, set it equal to 0, solve for , then use to find .