You need to change your first equation. If the number of sheep is $\frac{1}{3}$ the number of chicken then $3S = C$.
Also in your second equation, the $-$ needs to be a $+$ because if there are fewer sheep legs than chickens then you'll need to add 96 on the sheep value.
Then combine the equations and you'll get the answer.