the top and bottom margins of a poster are 6cm and the side margins are each 2 cm. if the area of printed material on the poster is fixed at 300 square centimeters, find the dimensions of the poster with the smallest area.

so this is what I have so far

xy=area = 300
y=300/x
new height with printed materials = (x+12)
new width with printed materials= ((300/x)+4)

new area=(x+12)((300/x)+4)
=300+4x+(3600/x)+48
=348+4x+(3600/x)
set equal to 0 and find derivative
0=348+4x+(3600/x)
0=4-(3600/x^2)
x^2=900
x=+-30
height=(x+12)=42cm
width=(300/x)+4 = 14cm

pls dont cheat, u'll get in trouble one day

good solution, but you don't need to set f(x) = 0

That is the area, which cannot be zero.
Just set f'(x) = 0 to find extrema