If I have two time series $A$ and $B$.
$A$ is dependent on $B$.
I want to forecast future values of $B$.

What statistical techniques should I learn and try?

As an example consider a time series of sales of Apple ipods every month.
Another time series is the number of defects in ipods reported.
Clearly if the sales are more the defects will be more too, assuming a constant
probability for a defect to occur.
How to use both $A$ and $B$ to forecast $B$?