<s>[INST] If $3\sin x +5\cos x=5$, then prove that $5\sin x-3\cos x=3$ 
If $3\sin x +5\cos x=5$ then prove that $5\sin x-3\cos x=3$

What my teacher did in solution was as follows
$$3\sin x +5\cos x=5 \tag1$$
$$3\sin x =5(1-\cos x) \tag2$$
$$3=\frac{5(1-\cos x)}{\sin x} \tag3$$
$$3=\frac{5\sin x}{(1+\cos x)} \tag4$$
$$5\sin x-3\cos x=3 \tag5$$
However this should not be true when $\sin x=0$, as division by zero is not defined; and also, if $\sin x=0$, then the expression we have to prove evaluates to $-3$. In other words question is incomplete but my teacher denied it.
Am I correct in my reasoning?
 [/INST] Yes you are right,he/she should have broken the problem into two cases.
Case $1.$ When $\sin x\ne 0$, then according to your teacher $5\sin x-3\cos x=3$.
Case $2.$ If $\sin x=0$, then from the given equation we get $\cos x=1$. Plugging these in to $5\sin x-3\cos x$ we get the required value as $-3$.
We can do the same problem in an alternative way:
$$3\sin x+5\cos x=5$$
Let $$5\sin x-3\cos x =k$$
Squaring and adding both the above equations we get
$$k^2+25=34$$
$\implies$
$$k=\pm 3$$
</s>