sinx-cosxtany=(sinxcosy-cosxsiny)/cosy
This is very simple.
All you have to know is tanx = sinx / cosx