.
Let x be the second number.
Then the first number is (2x+2).
The condition says
x*(2x+2) = 24.
Simplify and solve for x
x*(x+1) = 12.
The two solutions for x are obvious: x= 3 and x= -4.
It gives two pairs of the numbers, the problem asks for:
one pair is (2*3+2,3) = (8,3);
the other pair is (2*(-4)+2,-4) = (-6,-4).
Solved.
-----------------
The lesson to learn from my post is THIS :
When you "guess", be careful : guessing does not guarantee that you get all solutions.
Algebra guarantees (when it works . . . )