Make a system of equations.
\(\sf~x=3y+2\)
\(\sf~x+y=22\)
Re-arrange the 2nd equation:
\(\sf~x+y=22\)
Subtract y to both sides:
\(\sf~x=-y+22\)
Plug in -y + 22 for 'x' in the first equation.
\(\sf~x=3y+2\)
\(\sf~-y+22=3y+2\)
Subtract 3y to both sides:
\(\sf~-4y+22=2\)
Subtract 22 to both sides:
\(\sf~-4y=-20\)
Divide -4 to both sides:
\(\sf~y=\boxed{\sf5}\)
Plug this into any of the two equations to find 'x':
\(\sf~x+y=22\)
\(\sf~x+5=22\)
Subtract 5 to both sides:
\(\sf~x=\boxed{\sf17}\)
So one of the numbers is 5 and one of them is 17.