A' = (1/2)AB cos(theta)
Setting this to zero we get
cos(theta) = 0
which happens at theta = pi/2, 3*pi/2 rad.
The 3*pi/2 rad angle is ridiculously large for a triangle, so use theta = pi/2 rad. Is this point a local maximum? You can either do the second derivative test (ie show that A''(pi/2) < 0 ) or simply look at the graph of A(theta) at pi/2. It turns out that this is a maximum for the function.