@ancg3194,
it is a problem of nonhomogeneous system of differential equation,
dB/dt=-k2B+k1A0E^(-k1t)
is the transform of the original question.
you can solve its corresponding homogeneous differential equation:
dB/dt=-k2B
and you can get B=BoE^(-k2t) through the method of separation of variables. B0 is the arbitrary constant, and use the method of variation of parameters and look Bo as a function Bo(t), then B=Bo(t)E^(-k2t), and differentiate B you can get that
dB/dt=Bo'(t)E^(-k2t)-k2Bo(t)E^(k2t) =Bo'(t)E^(-k2t)-k2B
this equation should be identical to the original one
dB/dt=-k2B+k1A0E^(-k1t)
so dB/dt=Bo'(t)E^(-k2t)-k2B=-k2B+k1A0E^(-k1t)
therefore Bo'(t)E^(-k2t)=k1A0E^(-k1t)
Bo'(t)=k1AoE^(k2-k1)t
integrate both sides you get
Bo(t)=[k1Ao/(k2-k1)]E^(k2-k1)t
so B=Bo(t)E^(-k2t)=[k1Ao/(k2-k1)]E^(k2-k1)t*E^(-k2t)
=[k1Ao/(k2-k1)]E^(-k1t)