Since angles 1 and 2 are vertical angles, they are equal. So we can set their measures equal to each other:
\[ 5x + 1 = 4x + 3 \]
To solve for \(x\), first, subtract \(4x\) from both sides:
\[ 5x - 4x + 1 = 3 \]
This simplifies to:
\[ x + 1 = 3 \]
Next, subtract 1 from both sides:
\[ x = 3 - 1 \]
Thus,
\[ x = 2 \]
So the value of \(x\) is \(2\).