It is known that the maximum value of y = a-bcos (3x - π / 2) is 6 and the minimum value is - 2

It is known that the maximum value of y = a-bcos (3x - π / 2) is 6 and the minimum value is - 2

cos(3x-π/2)∈[-1,1]
(1) When b > 0, ymax = a + B = 6, ymax = A-B = - 2
∴a=2,b=4
(2) When B