Simple (not for me) algebra problem

I'm working from a book called Mathematics for Economics and Finance (Martin Anthony and Norman Biggs) I have a problem with one of their damn examples on supply and demand.

the supply set is S={(p,q)|q=bp-a} and D={(p,q)|q=c-dp}

when an excise tax is imposed i need to find the equilibrium quantity ( )

this is found by finding the equilibrium price ( )

So I solve simultaneously and get:

which is in the book. Now I need to find qT which the book states is found by:

I can't figure out how the hell these people managed to get bc-ad, Can someone tell me how they got this!?