$$(5-\sqrt2)(5+\sqrt2)=5^2-\left(\sqrt2\right)^2=25-2=23$$
But as some general rule of mathematics, if a rational number is added or subtracted from or to an irrational number the result is an irrational number but in above example there's something wrong
As per rules $(5-\sqrt2)$ and $(5+\sqrt2)$, both would be irrational and if we multiply both these irrational terms we get an irrational number which do not match to our result $23$.
How's that possible??