Let x be the first number and y be the second one.

If the sencond number is 2 more that 3 times the first number, we have:

\(\displaystyle{y}={2}+{3}{x}\)

The sum of them is 22, so

\(\displaystyle{x}+{y}={22}\)

Replace y by \(\displaystyle{2}+{3}{x}\) in the previous equation

\(\displaystyle{x}+{\left({2}+{3}{x}\right)}={22}\)

\(\displaystyle{x}+{2}+{3}{x}={22}\)

\(\displaystyle{4}{x}+{2}={22}\)

\(\displaystyle{4}{x}={22}-{2}\)

\(\displaystyle{4}{x}={20}\)

\(\displaystyle{x}={5}\) is the first number, then the second is:

\(\displaystyle{y}={2}+{3}\times{5}\)

\(\displaystyle{y}={17}\)

Thus, the answer is 5 and 17.

If the sencond number is 2 more that 3 times the first number, we have:

\(\displaystyle{y}={2}+{3}{x}\)

The sum of them is 22, so

\(\displaystyle{x}+{y}={22}\)

Replace y by \(\displaystyle{2}+{3}{x}\) in the previous equation

\(\displaystyle{x}+{\left({2}+{3}{x}\right)}={22}\)

\(\displaystyle{x}+{2}+{3}{x}={22}\)

\(\displaystyle{4}{x}+{2}={22}\)

\(\displaystyle{4}{x}={22}-{2}\)

\(\displaystyle{4}{x}={20}\)

\(\displaystyle{x}={5}\) is the first number, then the second is:

\(\displaystyle{y}={2}+{3}\times{5}\)

\(\displaystyle{y}={17}\)

Thus, the answer is 5 and 17.