What is the value of x?

again, we're assuming that both triangles are similar, and thus using proportions.
[tex]\stackrel{\textit{assuming the triangles are similar}}{\cfrac{x+1}{27}=\cfrac{5}{x-5}\implies x^2+x-5x-5=135}\implies x^2-4x-5=135 \\\\\\ x^2-4x-140=0\implies (x-14)(x+10)=0\implies x = \begin{cases} 14~\textit{\large \checkmark}\\ -10 \end{cases}[/tex]
we do not use the -10, because whatever value "x" may be, can't be negative or even 0.