I want to design a robust control system using the internal model design specifications. The block diagram is the one shown below:
I am trying to obtain the transfer function $\ \frac{Y(s)}{R(s)} $ in order to acquire the characteristic polynomial of the closed loop system but for some reason I am stuck. This is what I have done so far:
$$ E_{a}(s) = R(s) - Y(s) $$
$$ U(s) = E_{a}(s)G_{c}(s) - KX(s) $$ ( $\ U(s) $: control input to the process $\ G(s) $)
$$ Y(s) = U(s)G(s) = E_{a}(s)G(s)G_{c}(s)-KX(s)G(s) $$
$\ $
$$ Y(s) = R(s)G(s)G_{c}(s) - Y(s)G(s)G_{c}(s) - KX(s)G(s) $$ $\ $
$$ Y(s) = \frac{G(s)[R(s)G_{c}(s)-KX(s)]}{1+G(s)G_{c}(s)} $$
From this point, I really don't know how to continue. Obviously the term that confuses me is $\ X(s) $. So, now how should I proceed and obtain the overall transfer function ?

The problem is, that you really have two different outputs for $G$. The image is a bit misleading in this regard, because it suggests that both $X$ and $Y$ are outputs of the same $G$.
For state feedback, its often useful to also look at the state space form of a system. For example, $G(s)$ in state space form is
$$ \begin{align} \dot{x} &= A x + B u \\ y &= C x + D u \end{align} $$
Now, instead of this define a state space model that outputs all states:
$$ \begin{align} \dot{x} &= A x + B u \\ y &= x \end{align} $$
This system has the transfer function $G_x(s) = (s I_n - A)^{-1}B$. Note: $I_n$ is a $n \times n$ identity matrix. The output $Y(s)$ is then
$$ Y(s) = C G_x(s) U(s) + D U(s) $$
and so the original transfer function is
$$ G(s) = Y(s)/U(s) = C G_x(s) + D. \tag{1} $$
So you can now rewrite your formula as a function of $G_x$ by using $(1)$ for $G(s)$ and $X(s) = G_x(s) U(s)$.