a = Acos(alpha)

b = Asin(alpha)

Therefore

acos(x) + bsin(x) = Acos(x-alpha)

If you've already written it in the formk cos (x-a), then you can get the others simply by doing simple arithmetic, or applying basic facts about the trig functions...

Or, isn't it possible to do the same type of work to arrive at that form from scratch? ...