Answer:
Let's assume that the smaller number is x and the larger number is y.
From the problem, we can write:
y = 2x + 2 (since the quotient and remainder when y is divided by x are both equal to 2)
5x = 2(y - 2) (since the quotient and remainder when 5x is divided by y are both equal to 2)
Substituting the first equation into the second equation, we get:
5x = 2((2x + 2) - 2)
5x = 4x + 4
x = 4
Substituting x = 4 into the first equation, we get:
y = 2x + 2 = 10
Therefore, the two numbers are 4 and 10