Alternatively, you could use trail and error. So:
$${{\mathtt{1}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{2}}}^{{\mathtt{3}}} = {\mathtt{9}}$$
Too low
$${{\mathtt{3}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{4}}}^{{\mathtt{3}}} = {\mathtt{91}}$$
Still too low
$${{\mathtt{6}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{7}}}^{{\mathtt{3}}} = {\mathtt{559}}$$
Too high
$${{\mathtt{5}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{6}}}^{{\mathtt{3}}} = {\mathtt{341}}$$
Bingo
Let n be the first number and (n + 1) be the second...so we have
n^3 + (n + 1)^3 = 341 expand
n^3 + n^3 + 3n^2 + 3n + 1 = 341 simplify
2n^3 + 3n^2 + 3n - 340 = 0
Using the Factor Theorem here might be a little difficult.....using the on-site solver is easier.....!!
$${\mathtt{2}}\left[{{n}}^{{\mathtt{3}}}\right]{\mathtt{\,\small\textbf+\,}}{\mathtt{3}}\left[{{n}}^{{\mathtt{2}}}\right]{\mathtt{\,\small\textbf+\,}}{\mathtt{3}}{n}{\mathtt{\,-\,}}{\mathtt{340}} = {\mathtt{0}} \Rightarrow \left\{ \begin{array}{l}{\mathtt{n}} = {\mathtt{\,-\,}}{\frac{\left({\mathtt{5}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{15}}}}{\mathtt{\,\times\,}}{i}{\mathtt{\,\small\textbf+\,}}{\mathtt{13}}\right)}{{\mathtt{4}}}}\\
{\mathtt{n}} = {\frac{\left({\mathtt{5}}{\mathtt{\,\times\,}}{\sqrt{{\mathtt{15}}}}{\mathtt{\,\times\,}}{i}{\mathtt{\,-\,}}{\mathtt{13}}\right)}{{\mathtt{4}}}}\\
{\mathtt{n}} = {\mathtt{5}}\\
\end{array} \right\} \Rightarrow \left\{ \begin{array}{l}{\mathtt{n}} = {\mathtt{\,-\,}}\left({\frac{{\mathtt{13}}}{{\mathtt{4}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4.841\: \!229\: \!182\: \!760\: \!208\: \!2}}{i}\right)\\
{\mathtt{n}} = {\mathtt{\,-\,}}{\frac{{\mathtt{13}}}{{\mathtt{4}}}}{\mathtt{\,\small\textbf+\,}}{\mathtt{4.841\: \!229\: \!182\: \!760\: \!208\: \!2}}{i}\\
{\mathtt{n}} = {\mathtt{5}}\\
\end{array} \right\}$$
So n = 5 is the only "real" answer ...and n+1 = 5+1 = 6
Check
5^3 + 6^3 =
125 + 216 =
341 ......√√√
Alternatively, you could use trail and error. So:
$${{\mathtt{1}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{2}}}^{{\mathtt{3}}} = {\mathtt{9}}$$
Too low
$${{\mathtt{3}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{4}}}^{{\mathtt{3}}} = {\mathtt{91}}$$
Still too low
$${{\mathtt{6}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{7}}}^{{\mathtt{3}}} = {\mathtt{559}}$$
Too high
$${{\mathtt{5}}}^{{\mathtt{3}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{6}}}^{{\mathtt{3}}} = {\mathtt{341}}$$
Bingo