[guided]Fix $s \in \mathbb{C}$ with $p(s)\neq 0$. Before applying the resolvent $(sI_n-A_c)^{-1}$, we must prove that this inverse exists. Define the linear map $L_s: \mathbb{C}^n \to \mathbb{C}^n$ by sending $z \in \mathbb{C}^n$ to $(sI_n-A_c)z$. We prove that $L_s$ is injective. Let $w=(w_1,\dots,w_n)^\top \in \mathbb{C}^n$ satisfy $L_s w=0$. Since the only nonzero entry in row $i$ of $A_c$ for $1 \le i \le n-1$ is $(A_c)_{i,i+1}=1$, the first $n-1$ rows give $sw_i-w_{i+1}=0$ for $1 \le i \le n-1$. Thus $w_{i+1}=sw_i$, and induction gives $w_j=s^{j-1}w_1$ for $1 \le j \le n$. The last row of $L_s w=0$ is $a_0w_1+a_1w_2+\cdots+a_{n-1}w_n+sw_n=0$.
Substituting $w_j=s^{j-1}w_1$ gives $(a_0+a_1s+\cdots+a_{n-1}s^{n-1}+s^n)w_1=0$. The scalar in parentheses is $p(s)$, so $p(s)w_1=0$. Because $p(s)\neq 0$, we get $w_1=0$, and then $w_j=s^{j-1}w_1$ gives $w_j=0$ for every $1 \le j \le n$. Hence $\ker L_s=\{0\}$. Since $L_s$ maps the finite-dimensional vector space $\mathbb{C}^n$ to itself, the [Injective iff Surjective in Finite Dimensions](/theorems/386) theorem implies that $L_s$ is surjective and hence bijective. Therefore $(sI_n-A_c)^{-1}$ exists.
Now define $v \in \mathbb{C}^n$ by $v=(sI_n-A_c)^{-1}B_c$. Equivalently, $v$ is the unique solution of $(sI_n-A_c)v=B_c$. Write $v=(v_1,\dots,v_n)^\top$. The reason the companion form is useful is that the first $n-1$ equations contain no denominator coefficients; they only propagate powers of $s$. Indeed, since the only nonzero entry in row $i$ of $A_c$ for $1 \le i \le n-1$ is $(A_c)_{i,i+1}=1$, the $i$-th row of the equation is $sv_i-v_{i+1}=0$. Thus $v_{i+1}=sv_i$ for $1 \le i \le n-1$. Starting with $v_1$, this recursion gives $v_2=sv_1$. Applying the same recursion repeatedly gives $v_j=s^{j-1}v_1$ for $1 \le j \le n$.
It remains to determine the scalar $v_1$. The last row is where the denominator coefficients enter. Since $(A_c)_{n,j}=-a_{j-1}$ for $1 \le j \le n$, and since the last component of $B_c$ is $1$, the last row of $(sI_n-A_c)v=B_c$ is $a_0v_1+a_1v_2+\cdots+a_{n-1}v_n+sv_n=1$. Substituting $v_j=s^{j-1}v_1$ into this equation yields $(a_0+a_1s+\cdots+a_{n-1}s^{n-1}+s^n)v_1=1$. The scalar multiplying $v_1$ is exactly $p(s)$, so
\begin{align*}
p(s)v_1=1.
\end{align*}
Because we fixed $s$ with $p(s)\neq 0$, division by $p(s)$ is valid, and therefore
\begin{align*}
v_1=\frac{1}{p(s)}.
\end{align*}
Combining this value with $v_j=s^{j-1}v_1$ gives
\begin{align*}
(sI_n-A_c)^{-1}B_c=\frac{1}{p(s)}(1,s,\dots,s^{n-1})^\top.
\end{align*}[/guided]