5sinx+3sin(x-q)
= 5sinx+3sinxcosq-3cosxsinq
=(5+3cosq) sinx-3sinqcosx
=asinx-bcosx, [where (5+3cosq)=a and 3sinq =b]
= (a2+b2)^1/2[{a/(a2+b2)^1/2}sinx-{b/(a2+b2)^1/2}cosx]
= (a2+b2)^1/2[cosØsinx-sinØcosx], where tanØ=b/a
=(a2+b2)^1/2[sin(x-Ø)]
this will have maximum value for sin(x-Ø)=1
Hence max[5sinx+3sin(x-q)] =7
=> (a2+b2)^1/2=7
=>(a2+b2)=49
=> ((5+3cosq)2+(3sinq)2)=49
=> (25+9cos2q+30cosq+9sin2q)=49
=> 34+30cosq=49 {since 9cos2q+9sin2q=9]
=> cosq=1/2=cos(π/3)
So q = 2nπ±π/3, where n belongs to Z