A rectangular window surmounted by an equilateral triangle has a perimeter of 12ft, find the dimensions of rectangle that will give largets area of window.

Now I know for these types of question, a diagram is useful. Also I need to find a primary and secondary equation, given that if there are more than one variable. I then find the dervative and solve for 0 and do sign chart. but Im not sure if the window is inscibed in the trianlge or vice versa. Do I use the equation of the perimter 2x+2y=12 and Area which iis A: XY and plug in and find derivative? I don't see what role the trianlge plays if any.