The ODE is linear. Multiplying both sides by [tex]e^{7t}[/tex] allows you to condense the left hand side as the derivative of a product.
[tex]x'+7x=5\cos2t[/tex]
[tex]e^{7t}x'+7e^{7t}x=5e^{7t}\cos2t[/tex]
[tex]\dfrac{\mathrm d}{\mathrm dt}\left[e^{7t}x\right]=5e^{7t}\cos2t[/tex]
Integrating both sides with respect to [tex]t[/tex] yields
[tex]e^{7t}x=5\displaystyle\int e^{7t}\cos2t\,\mathrm dt[/tex]
The integral can be done by parts. You should get
[tex]e^{7t}x=\dfrac5{53}e^{7t}(7\cos2t+2\sin2t)+C[/tex]
[tex]x=\dfrac5{53}(7\cos2t+2\sin2t)+Ce^{-7t}[/tex]
With the given initial condition, you have
[tex]0=\dfrac5{53}(7+0)+C\implies C=-\dfrac{35}{53}[/tex]
So the particular solution to the ODE is
[tex]x=\dfrac5{53}(7\cos2t+2\sin2t)-\dfrac{35}{53}e^{-7t}[/tex]