Search the documentation for Taylor, first hit is [`Series`][1].

Solve Differential equation, 

    sol = x[t] /. First@DSolve[
        {
         D[x[t], t] == -k1 x[t] + (1 - x[t]) k2 Exp[-k2 t]
         , x[0] == 0
         }
        , x[t], t];

You can get the series by `Series[sol, {t, 0, 3}]` but you are interested only in the 2nd and 3rd order coefficients, so you see at the bottom of the documentation the related functions and you find [`SeriesCoefficient`][2]

The `Series` 2nd order coefficient is:

    SeriesCoefficient[sol, {t, 0, 2}]
>    -((k1 k2)/2) - k2^2

Third order:

    SeriesCoefficient[sol, {t, 0, 3}]
>   1/6 (k1^2 k2 + 3 k1 k2^2 + 5 k2^3)



  [1]: http://reference.wolfram.com/language/ref/Series.html
  [2]: http://reference.wolfram.com/language/ref/SeriesCoefficient.html