Those are very general questions: what "can you do" and what "can't you do"...in terms of using trig identities:
What you can do is use an identity to replace one expression with its strict equivalent, as determined by the identity in question. It's simply grounded in "substituting one expression for its equivalent", which is legitimate beyond just its handiness with utilizing trig identities to transform one expression to an equivalent expression.
You can algebraically manipulate equations involving trigonometric expressions in any way that is "legal" for manipulating any equation.
So for a simple example, ${1-\sin^2\theta} = \cos^2 \theta$ because we know the identity:
$$\sin^2\theta + \cos^2\theta = 1.$$ We do not change this equivalence when we manipulate it to get: $$\sin^2\theta + \cos^2\theta = 1 \iff \cos^2\theta = 1 - \sin^2\theta$$
In the identity you solved, you can use:
$$\sin c+\sin d=2\sin\frac{c+d}2\cos\frac{c-d}2$$
Applied here: $$\sin9x+\sin x=2\sin\frac{9x+x}2\cos\frac{9x-x}2=2\sin5x\cos4x$$
$$2\sin a\cos b=\sin(a+b)+\sin(a-b)$$
Applied here: $$2\sin5x\cos4x=\sin(5x+4x)+\sin(5x-4x)=\sin9x+\sin x$$