The resultant of two forces X and Y will be greatest when the angle between X and Y is

well, the magnitude of z=x+y is

z^2 = x^2 + y^2 + 2xy cosθ

so, for what θ is that the maximum?
That is, when is cosθ a maximum?