Answer
$\frac{dx_2}{dt}+2tx_2+x_1=\cos t\\
x_2=\frac{dx_2}{dt}$
Work Step by Step
Given
$y''+2ty'+y=\cos t$
We introduce new variables $x_1$ and $x_2$ defined by
$x_1=y\\
x_2=\frac{dy}{dt}$
Then the given differential equation can be replaced by the first-order system
$\frac{dx_2}{dt}+2tx_2+x_1=\cos t\\
x_2=\frac{dx_2}{dt}$