Start with the underlying homogeneous equation:
[tex]y''-7y'+6y=0[/tex]
which has characteristic equation
[tex]r^2-7r+6=(r-6)(r-1)=0[/tex]
with roots at r = 6 and r = 1. So the characteristic solution is
[tex]y_c=C_1e^{6x}+C_2e^x[/tex]
Now for the particular solution, we can use the method of undetermined coefficients, with the following ansatz (the "guess" solution) and its derivatives,
[tex]y_p=a\cos x+b\sin x[/tex]
[tex]{y_p}'=-a\sin x+b\cos x[/tex]
[tex]{y_p}''=-a\cos x-b\sin x[/tex]
Substituting these into the original equation gives
[tex](-a\cos x-b\sin x)-7(-a\sin x+b\cos x)+6(a\cos x+b\sin x)=\sin x[/tex]
[tex](5a-7b)\cos x+(7a+5b)\sin x=\sin x[/tex]
[tex]\implies\begin{cases}5a-7b=0\\7a+5b=1\end{cases}\implies a=\dfrac7{74},b=\dfrac5{74}[/tex]
So the particular solution is
[tex]y_p=\dfrac7{74}\cos x+\dfrac5{74}\sin x[/tex]
and hence the general solution is
[tex]y=y_c+y+p=\boxed{C_1e^{6x}+C_2e^x+\dfrac7{74}\cos x+\dfrac5{74}\sin x}[/tex]