The first part:
(pq)/(1-q)
= (tanx tany cos(x + y)) / (1 - tanx tany)
Using the identities tanx = sinx/cosx and cos(x+y) = cosxcosy - sinxsiny on the numerator and denominator, and cross-multiplying in the denominator:
= ({(sinx siny)/(cancel(cosx cosy))}cancel({ cosx cosy - sinx siny})) / [(cancel(cosx cosy - sinx siny))/ (cancel(cosx cosy))]
= sinx siny
The second part:
(q (1 +p))/(1 - p)
= (cosx cosy - sinx siny) [(1 + tanx tany)/ (1 - tanx tany)]
From here we can do the following:
(1 + tanx tany)/ (1 - tanx tany) = (1+(sinxsiny)/(cosxcosy))/(1-(sinxsiny)/(cosxcosy))
Cross-multiply to get:
= (((cosxcosy)+(sinxsiny))/(cancel(cosxcosy)))/(((cosxcosy)-(sinxsiny))/(cancel(cosxcosy)))
= (cosxcosy+sinxsiny)/(cosxcosy-sinxsiny)
Thus, we have:
= cancel((cosx cosy - sinx siny)) [ (cosx cosy + sinx siny)/ cancel((cosx cosy - sinx siny))]
= cosx cosy + sinx siny
= cos (x - y)