I assume that you were running regression analysis with the two tasks. By assigning task A as baseline while keeping the resting period as one regresor and task B as another, the HRF of task A would be modeled with some drifting curve (straight line in default), and that of task B would be assumed to be gamma variate. That is not what you want.
As I said before, the plain and straightforward approach makes more sense: run 3dDeconvolve with tasks A and B as two separate regressors, and set the -glt option with an appropriate vector so that it would generate the difference between the two tasks. In doing so, you don't need to worry about the baseline since it is automatically taken care of in the regression model. Check the manual of 3dDeconvolve on how to set up glt vectors.
Gang