(a) We have $E(x)+O(x)=0\tag{$1$}$ for all $x$.
It follows that $E(-x)+O(-x)=0$ for all $x$.
But $E(-x)=E(x)$ and $O(-x)=-O(x)$. Thus $E(x)-O(x)=0\tag{$2$}$ for all $x$.
Now look at Equations $(1)$ and $(2)$ and add. We get $2E(x)=0$ for all $x$. It follows that $E(x)=0$ for all $x$, and therefore from Equation $(1)$, $O(x)=0$ for all $x$.
(b) Note that $\cos$ is an even function and $\sin$ is an odd function. Thus $A\sin(ax)$ is odd and $B\cos(bx)$ is even.
It follows from (a) that if $A\sin(ax)+B\cos(bx)$ is identically $0$, then $A\sin(ax)$ and $B\cos(bx)$ are each identically $0$. Put $x=0$. Since $\cos(0)=1$ and $\sin(0)=0$, it follows that $B=0$.
From the fact that $A\sin(ax)=0$ for all $x$, it follows that either $A=0$ or $\sin(ax)=0$ for all $x$. Suppose that $A\ne 0$. We show that $a$ must be $0$.
For if $a\ne 0$, then letting $x=\pi/2a$ we find that $\sin(\pi/2)=0$, which is false.