In a right triangle, the sum of the angles is always 180 degrees, but since one angle is 90 degrees, the sum of the other two angles (A and B) must equal 90 degrees. Therefore, we have the equation:
\[ A + B = 90 \]
Substituting the expressions for A and B:
\[ (2x + 51) + (7x - 15) = 90 \]
Now, combine the like terms:
\[ 2x + 7x + 51 - 15 = 90 \]
This simplifies to:
\[ 9x + 36 = 90 \]
Next, isolate the variable \(x\):
- Subtract 36 from both sides:
\[ 9x = 90 - 36 \] \[ 9x = 54 \]
- Divide by 9:
\[ x = \frac{54}{9} \] \[ x = 6 \]
Thus, the value of \(x\) is \( \boxed{6} \).