I have:

$\displaystyle A=kte^{-at}$

since at any time there will be kt of A but its also decaying

$\displaystyle B = kt -kte^{-at} $

since at any moment in time kt will be the amount of substance so kt - (amount of A) = amount of B?

I don't know how to set up the differential equations at the start and I don't think your supposed to start with the solution!