Ultimately, it should be clear that they are equivalent. Let me rewrite yours as $$y=a_1+a_2x+e^x\bigl(a_3\cos(2x)+a_4\sin(2x)\bigr).$$ Setting $c_1=a_1,$ $c_2=a_2,$ $c_3=4a_3+3a_4,$ and $c_4=3a_3-4a_4,$ we then have $$y=c_1+c_2x+\frac1{25}\Bigl(c_3\bigl(4\cos(2x)+3\sin(2x)\bigr)+c_4\bigl(3\cos(2x)-4\sin(2x)\bigr)\Bigr)e^x.$$ On the other hand, starting with WA's solution, we set $a_1=c_1,$ $a_2=c_2,$ $a_3=\frac{4c_3+3c_4}{25},$ and $a_4=\frac{3c_3-4c_4}{25},$ yielding your solution.
I can't say for sure how WA obtained that solution or why they left it as they did, but here's an idea of an approach similar to that which it may have taken. Consider the ODE $$z''-2z'+5z=0\tag{$\star$}.$$ If $z(x)$ is a solution to $(\star),$ then any $y(x)$ satisfying $y''=z$ will satisfy the given ODE. On the other hand, if $y(x)$ is a solution to the given ODE, then $z=y''$ will be a solution to $(\star).$ Thus, it may be that WA began by considering $(\star),$ instead. The characteristic equation of $(\star)$ is $$\lambda^2-2\lambda+5=0,$$ which readily has solutions $\lambda=1\pm2i.$ Thus, the general solution to $(\star)$ is of one of the following equivalent forms: $$z(x)=b_1e^{(1+2i)x}+b_2e^{(1-2i)x}\\ z(x)=b_1e^{x+2xi}+b_2e^{x-2xi}\\ z(x)=\left(b_1e^{2xi}+b_2e^{-2xi}\right)e^x\\ z(x)=\left(b_1\bigl(\cos(2x)+i\sin(2x)\bigr)+b_2\bigl(\cos(2x)-i\sin(2x)\bigr)\right)e^x\\ z(x)=\left(\bigl(b_1+b_2)\cos(2x)+(b_1-b_2)i\sin(2x)\right)e^x.$$ There's no real reason to leave it this way, of course, so at this point, WA may have replaced it with $$z(x)=\bigl(c\cos(2x)+d\sin(2x))e^x,$$ or may have simply skipped right to this form.
At this point, having found $z(x),$ it may have found the general antiderivative (which would correspond to $y'$), then found the general antiderivative yet again. As I discuss in this answer, iterated integration by parts gives us the general formula $$\int e^{ax}\sin(bx)\,dx=e^{ax}\left(\frac{a}{a^2+b^2}\sin(bx)-\frac{b}{a^2+b^2}\cos(bx)\right)+C.$$ A similar approach yields $$\int e^{ax}\cos(bx)\,dx=e^{ax}\left(\frac{a}{a^2+b^2}\cos(bx)+\frac{b}{a^2+b^2}\sin(bx)\right)+C.$$ In our particular case, this means that $$\int e^x\cos(2x)\,dx=e^x\left(\frac15\cos(2x)+\frac25\sin(2x)\right)+C=\frac15\left(\cos(2x)+2\sin(2x)\right)e^x+C,$$ and similarly, $$\int e^x\sin(2x)\,dx=\frac15\left(\sin(2x)-2\cos(2x)\right)e^x+C.$$
Thus, $$y'(x)=\frac15\Bigl(c\bigl(\cos(2x)+2\sin(2x)\bigr)+d\cdot\bigl(\sin(2x)-2\cos(2x)\bigr)\Bigr)e^x+c_2,$$ or $$y'(x)=\frac15\Bigl((c-2d\bigr)\cos(2x)+\bigl(2c+d\bigr)\sin(2x)\Bigr)e^x+c_2.$$ Repeating this process again yields $$y(x)=\frac1{25}\Bigl(\bigl(c-2d\bigr)\bigl(\cos(2x)+2\sin(2x)\bigr)+\bigl(2c+d\bigr)\cdot\bigl(\sin(2x)-2\cos(2x)\bigr)\Bigr)e^x+c_2x+c_1,$$ or $$y(x)=c_1+c_2x+\frac1{25}\Bigl(c\bigl(4\sin(2x)-3\cos(2x)\bigr)-d\bigl(4\cos(2x)+3\sin(2x)\bigr)\Bigr)e^x.$$ At this point, we can let $c_3=-d$ and $c_4=-c,$ whence $$y(x)=c_1+c_2x+\frac1{25}\Bigl(c_3\bigl(4\cos(2x)+3\sin(2x)\bigr)+c_4\bigl(3\cos(2x)-4\sin(2x)\bigr)\Bigr)e^x.$$ I can't really see any reason for this final substitution, though, so I suspect WA didn't go about it in exactly this way.