To solve for \( x \), we start by recognizing that the two adjacent angles together form a right angle, which measures \( 90^\circ \).
The measures of the two angles are given as:
- First angle: \( (x + 4)^\circ \)
- Second angle: \( (3x + 2)^\circ \)
We can set up the equation:
\[ (x + 4) + (3x + 2) = 90 \]
Now, we simplify and combine like terms:
\[ x + 4 + 3x + 2 = 90 \]
\[ 4x + 6 = 90 \]
Next, we isolate \( 4x \) by subtracting 6 from both sides:
\[ 4x = 90 - 6 \]
\[ 4x = 84 \]
Now, we divide both sides by 4 to solve for \( x \):
\[ x = \frac{84}{4} \]
\[ x = 21 \]
Thus, the value of \( x \) is \( \boxed{21} \).