DSolve[{-x[t] + 2*y[t] + Derivative[1][x][t] == 0, -2*Derivative[1][y][t] + Derivative[2][x][t] == 2*t - Cos[2*t]},{x[t], y[t]},t]