Verified Answer :

\(a\sin(b(x-h))=a\sin(bx)\cos(bh)-a\cos(bx)\sin(bh)\)

For this to be equivalent to \(5\cos x+2\sin x\), you require \(b=1\) and

\(\begin{cases}a\cos h=2\\-a\sin h=5\end{cases}\)

Dividing the second equation by the first gives

\(\dfrac{-a\sin h}{a\cos h}=-\tan h=\dfrac52\implies h=\arctan\left(-\dfrac52\right)=-\arctan\dfrac52\)

Meanwhile, you also get

\(a\cos\left(-\arctan\dfrac52\right)=2\implies a\cos\left(\arctan\dfrac52\right)=\dfrac{2a}{\sqrt{29}}=2\implies a=\sqrt{29}\)

So,

\(f(x)=5\cos x+2\sin x=\sqrt{29}\sin\left(x+\arctan\dfrac52\right)\)