Since triangles ABC and XYZ are congruent, the corresponding angles in both triangles are equal. Therefore, we can set up the following equation based on the information provided:
\[ \angle A = \angle X \]
Substituting the values for the angles gives:
\[ 5x + 3 = 7x - 27 \]
Now, we can solve for \( x \):
- First, rearrange the equation:
\[ 5x + 3 = 7x - 27 \]
- Subtract \( 5x \) from both sides:
\[ 3 = 2x - 27 \]
- Add \( 27 \) to both sides:
\[ 30 = 2x \]
- Divide both sides by \( 2 \):
\[ x = 15 \]
Thus, the value of \( x \) is:
\[ \boxed{15} \]