It’s not a trick. It’s taken as fact in the world of mathematics.
There are a few ways of proving, and this is the simplest:
1/3 = 0.333…
3 x 1/3 = 0.999…
and 3 x 1/3 = 1
This can also be used for other numbers, such as:
5.2 = 5.1999…
What I really love about this is that for 0.999… there are an infinite amount of 9s, but at some point at the end of the 9s there an infinitely small number, actually called an infinitesimal, that bridges the gap between 0.999… and 1, and technically this infinitesimal up all other numbers.
Which would bring us to the fun question:
If there’s is no difference between 0.999… and 1 because of an infinitely small unit, that also makes up all other numbers, then what makes other number different from each other?