If the first of the two integers is
, the next one is
. So, the sum of their cubes are

So, we have the following equation:

By the rational root theorem, if this polynomial admits a rational root, it is a fraction
where p divides 1240 and q divides 2 (i.e., q=1 or q=2). You'll have to go with a bit of trial and error here, because the standard formula for solving cubic equation is quite complicated.
Eventually, you'll arrive to p=8, q=1, and if you plug 8 into the equation you'll see that it is a solution. So, the two numbers are 8 and 9, in fact
