i have 2 equations of second order that model the same system and i have to model with state variables
$$\frac{d^2y}{dt^2}+2\frac{dy}{dt}+3y(t)+2\frac{dz}{dt}+z(t)=U_1(t)$$ $$4y(t)+\frac{d^2z}{dt^2}+3\frac{dz}{dt}+4z(t)=U_2(t)$$
For first equation $${x}_1 = 3y(t)$$ $$\dot{x}_1 = 2\frac{dy}{dt} =x_2$$ $$\dot{x}_2 = \frac{d^2y}{dt^2}=x_3$$ How i write this for z variable? $${x}_4 = z(t)$$ $$\dot{x}_4 = 2\frac{dz}{dt}=x_3$$
For second equation: I guees have to reuse the terms for first equation, like this: $${x}_1 = 4y(t)$$ $${x}_4 = 4z(t)$$ $$\dot{x}_4 = 3\frac{dz}{dt}=x_5$$ $$\dot{x}_5 = \frac{d^2z}{dt^2}$$
Then i do the definition of the state variables and the construction of the array, but I need to know if my approach is well
Your approach is almost right. Forget about the coefficients and just define $x_1 = y$, $x'_1 = x_2 = y'$. For $z$ do just the same: $x_3 = z$, and $x'_3 = x_4 = z'$. Then plug this information into both equations. You need as many state variables as the maximum order of-differentiation for each dependent variable, i.e., in your case you need six state variables.