Step 1: Use \(S = \tfrac{A+B+C}{2}\).
Then \[ S - A = \tfrac{B + C - A}{2}, \quad S - B = \tfrac{A + C - B}{2}, \quad S - C = \tfrac{A + B - C}{2}. \] Also \(\cos S = \cos\!\bigl(\tfrac{A+B+C}{2}\bigr)\).
Step 2: Trigonometric manipulations (outline).
We expand \(\sin(S-A)\cos(S-B)\) and \(\sin(S-C)\cos S\) in terms of \(\sin,\cos\) of \(\tfrac{A+B+C}{2}\pm(\dots)\). After simplification (often seen in triangle-related identities), one obtains \[ \sin(S-A)\cos(S-B)\;-\;\sin(S-C)\cos S \;=\; \cos A\,\sin B. \]