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 ($\displaystyle q^{T}$)

this is found by finding the equilibrium price ($\displaystyle p^{T}$)

So I solve simultaneously and get:

$\displaystyle p^{T}=\frac{(c+a)}{(b+d)}+\frac{bT}{b+d}$

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

$\displaystyle q^{T}=c-dp^{T}=\frac{(bc-ad)}{(b+d)}+\frac{bdT}{b+d}$

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