Given:
There are given the function:

Step-by-step explanation:
According to the question:
We need to find the local minima and local maxima:
So,
To find the derivatives, first, we need to find the derivatives of the given function:
So,
From the function:

Then,
From the first derivatives:

Then,
Find where the first derivative is equal to 0 to find the local maxima and minima:
So,

Then,

Then,

Then,
Put the value of 3 and 9 for x into the given function:
So,
First put 3 for x:

And,
Put 9 for x:

Final answer:
Hence, the function has a local minimum at x = 9 with the output value 8 and a local maximum at x = 3 with the output value 224.