you have to find the main condidtion which contains the variable which should get an extreme value. With your problem it is the variable for the area: a.
1. main condition:
2. aux. conditions:
i) If the point A has the coordinates A(p, 9-pē), p > 0, then the base b of the triangle is:
ii) then the height h is:
3. Substitute the variables from the aux. condition into the equation of the main condition and you'll get the characteristic function:
4. Derivate a wrt p: . To get the extreme value a'(p) = 0. Solve for p.
5. You'll get . The point A has the coordinates A( , 6) and the maximum value of the area is:
6. I've attached a sketch of the situation.