To find \( x \), we need to use the property that a matrix is singular if its determinant is 0. Therefore, we must compute the determinant of the matrix and set it equal to 0.
The determinant of the 3x3 matrix is given by the formula:
\[
\text{det} = a(ei - fh) - b(di - fg) + c(dh - eg)
\]
For the matrix
\[
\begin{bmatrix}
2 + x & 3 & 4 \\
1 & -1 & 2 \\
x & 1 & -5
\end{bmatrix}
\]
we calculate the determinant as follows:
\[
\text{det} = (2 + x) \left( (-1)(-5) - (B)(A) \right) - 3 \left( (A)(-5) - (B)(x) \right) + 4 \left( (A)(A) - (-1)(x) \right)
\]
Step 1: Simplify each part
\[
\text{det} = (2 + x) \left( 5 - 2 \right) - 3 \left( -5 - 2x \right) + 4 \left( 1 + x \right)
\]
\[
= (2 + x)(3) - 3(-5 - 2x) + 4(1 + x)
\]
\[
= 3(2 + x) + 15 + 6x + 4 + 4x
\]
\[
= 6 + 3x + 15 + 6x + 4 + 4x
\]
\[
= 25 + 13x
\]
Step 2: Set the determinant equal to 0
Since the matrix is singular, the determinant must be 0:
\[
25 + 13x = 0
\]
Solving for \( x \):
\[
13x = -25
\]
\[
x = \frac{-25}{13}
\]
Thus, the value of \( x \) is \( \frac{-25}{13} \).