Clear[x];
DSolve[{x'[t]==((-1)/T)(x[t]-xa)-((m (k1^2))/2) (E^(((t-tf))/T)),x[t0]==x0},x[t],t]//Simplify

Expand[(1/4) (E^(-((t+tf)/T))) (-(E^((2 t)/T)) (k1^2) m T+(E^((2 t0)/T)) (k1^2) m T+4 (E^((t0+tf)/T)) (x0-xa)+4 (E^((t+tf)/T)) xa)]

(E^(-((t+tf)/T)+((t0+tf)/T))) x0+xa-(E^(-((t+tf)/T)+((t0+tf)/T))) xa//Simplify

-(1/4) (E^(((2 t)/T)-((t+tf)/T))) (k1^2) m T+(1/4) (E^(((2 t0)/T)-((t+tf)/T))) (k1^2) m T//Simplify

Lets check this solution :

x[t_]:=xa+(x0-xa) (E^((-(t+t0))/T))-m (k1^2)(T/4)( (E^(((t-tf))/T))+(E^(((2 t0-t-tf))/T)));
D[x[t],t]+(1/T)(x[t]-xa)+((m (k1^2))/2) (E^(((t-tf))/T))//Simplify

Evaluate the above at tf and we get

x[tf]//Simplify