Answer:
[tex] +(x + y) {}^{2} = 6 {}^{2} \\ x {}^{2} + 2xy + y {?}^{2} = 36 [/tex]
[tex]x {}^{2} + y {}^{2} = 36 - 2xy[/tex]
[tex]q = 3(x {}^{2} + y {}^{2} ) [/tex]
[tex]q = 3(36 - 2xy) = 108 - 6xy[/tex]