Suppose we are given the following system: \begin{equation} \dot{x} = Ax + \begin{bmatrix} 1 \\ 2 \\ \end{bmatrix} u \end{equation} \begin{equation} y = Cx \end{equation}
We know that when the initial condition is $[1 \quad 1]^{T}$ and $u = 0$, the output stays constant at $y(t) = 2$. Furthermore, the transfer function is $\frac{1}{s+1}$ and the system is known to be detectable. Now, I want to find $A$ and $C$.
Approach: Since this system has a constant output, the eigenvalue that belongs to observable mode of the system is $0$. The other eigenvalue (which belongs to unobservable part) can be anything but must satisfy $Re\{\lambda_{unobservable}\} < 0$ since the system is detectable. On the other hand, the transfer function has a root at ${-1}$. This must be an eigenvalue of this system and this eigenvalue should contribute to observable part, but if this is the eigenvalue then the output cannot remain constant. What's going on here?
More formally, let's consider the system in observable decomposition form:
\begin{equation} \dot{x} = \begin{bmatrix} A_o & 0 \\ A_{21} & A_u\\ \end{bmatrix}x + \begin{bmatrix} 1 \\ 2 \\ \end{bmatrix} u \end{equation} \begin{equation} y = [C_o \quad 0]x \end{equation}
where sub-indices $o$ and $u$ represents observable and unobservable parts. Now, one of the eigenvalues is $-1$ from the transfer function and in order to get a constant output the other eigenvalue should be $0$. There are two possibilities for $A$ in here ($A_{21}$ is arbitrary, maybe I should play with that to satisfy this $y(t)=2$ condition later):
For example, if I construct $A = \begin{bmatrix} -1 & 0 \\ 1 & 0\\ \end{bmatrix}$ and $C = [1 \quad 0]$ then:
$H(s) = C[sI-A]^{-1}B = \frac{1}{s+1}$
$y(t) = [1 \quad 0]e^{At}x(0) = [1 \quad 0]\begin{bmatrix} e^{-t} & 0 \\ 1-e^{-t} & 1\\ \end{bmatrix}\begin{bmatrix} 1 \\ 1 \\ \end{bmatrix} = e^{-t}$
Second possibility, $A = \begin{bmatrix} 0 & 0 \\ 1 & -1\\ \end{bmatrix}$ and $C = [1 \quad 0]$ then:
$H(s) = C[sI-A]^{-1}B = \frac{1}{s}$
$y(t) = [1 \quad 0]e^{At}x(0) = [1 \quad 0]\begin{bmatrix} 1 & 0 \\ 1-e^{-t} & e^{-t}\\ \end{bmatrix}\begin{bmatrix} 1 \\ 1 \\ \end{bmatrix} = 1$
It seems I cannot satisfy two conditions simultaneously. So, why can't I construct the $A$ this way? What should be the approach to construct $A$?
It is given that
\begin{align} \dot{x} &= A\,x + B\,u, \\ y &= C\,x, \end{align}
with $B=\begin{bmatrix}1 & 2\end{bmatrix}^\top$ and transfer function $G(s)=C\,(s\,I-A)^{-1} B = (s+1)^{-1}$. Furthermore, it is also given that for the initial condition $x(0)=\begin{bmatrix}1 & 1\end{bmatrix}^\top$ and $u(t)=0$ yields $y(t)=2$.
From the size of $B$ and initial conditions $x(0)$ it follows that it is a two dimensional state space model, so with at most two different modes. The transfer function implies that the state space model has one mode, with an eigenvalue of $-1$, that is both observable and controllable. And as already noted by you the other mode has an eigenvalue of zero, but is only observable and not controllable.
From this it follows that the eigen decomposition of $A$ can be written as
$$ A = V\,\Lambda\,V^{-1}, $$
with for example
$$ \Lambda = \begin{bmatrix} -1 & 0 \\ 0 & 0 \end{bmatrix}. $$
The eigenvectors in $V$ can be obtained using $B$ and $x(0)$. Namely, the input matrix $B$ can only excite the mode with eigenvalue $-1$ and similarly the initial state $x(0)=\begin{bmatrix}1 & 1\end{bmatrix}^\top$ only excites the mode with eigenvalue $0$. Therefore, for the chosen order of the eigenvalues in $\Lambda$ the corresponding eigenvectors in $V$ should be
$$ V = \begin{bmatrix}B & x(0)\end{bmatrix} = \begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}. $$
And lastly, the provided information is also enough to construct a system of linear equations which can be solved for $C$. For the first linear equation one can use that $C\,x(0) = 2$. For the second linear equation one can use that $G(s) = (s+1)^{-1}$, thus
\begin{align} G(s) &= C\,(s\,I-A)^{-1} B, \\ &= C\,V\,(s\,I-\Lambda)^{-1}\,V^{-1} B, \\ &= C\,V\,\begin{bmatrix} (s+1)^{-1} & 0 \\ 0 & s^{-1} \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \\ &= C\,B\,(s+1)^{-1}. \end{align}
The constraint that $G(s) = (s+1)^{-1}$ can only be true if $C\,B = 1$. Combining these two linear equations yields that $C$ can be found by solving
$$ C\, \begin{bmatrix} x(0) & B \end{bmatrix} = \begin{bmatrix} 2 & 1 \end{bmatrix}. $$
I will leave solving for the actual numerical values of the matrices $A$ and $C$ up to you.