Transfer function of cyclic block diagram
Second equation contains a term \$ -x\cdot A \cdot B\$ in the RHS. Take the \$ -x\cdot A \cdot B\$ from the second equation to its LHS. Then, substitute for x in the first equation with x from the (now re arranged) second equation. This eliminates the variable x in the final equation.
Other methods
Apart from the above manual elimination of variables, there are two more methods. Block diagram reduction techniques and Mason Gain Formula. If you are familiar with either technique, use one which is convenient.
Block diagram reduction
Shift the junction labelled x to the right of the C block by using an additional 1/C block in the feedback path. Now you have nested feedbacks. Use the G/(1+GH) feedback formula on the innermost loop and repeat until no more loops remain.