Let x represent the first number and y represent the second number.

The second number is 2 more than 3 times the first number:

\(y=2+3x\)

The sum of the two numbers is 22:

\(x+y=22\)

Let us replace y by \(2+3x\) in the previous equation (as \(y=2+3x\) holds):

\(x+(2+3x)=22\)

Combine like terms:

\(2+4x=22\)

Subtract 2 from each side:

\(4x=20\)

Divide each side by 4:

\(x=5\)

Thus we obtain that the first number is x=5

Let us then determmine the second number by evaluating \(y=2+3x\) as \(x=5\):

\(y=2+3x=2+3(5)=2+15=17\)

Thus the two numbers are then 5 and 17.

Result: 5 and 17