Alright, so I'm pretty new at this. I feel like this should be a pretty simple solution, but I don't know how to start.
So here's where I was going
If we have a set $\{1,2,...,99\}$ and then I start making groups that have a pair of integers that differ by 2 at the most. $$ \text{group}_1 = (1,2)\\ \text{group}_2 = (3,4) \\ \vdots \\ \text{group}_{49} = (97,98) $$ Now I know I don't use $99$ but it says at most $99$. Another thing I could do is make the groups like so \begin{align} \text{group}_1 &= (1,3) \\ \text{group}_2 &= (2,4)\\ \text{group}_3 &= (5,7)\\ \text{group}_4 &= (6,8)\\ &\vdots\\ \text{group}_{48} &= (94,96)\\ \text{group}_{49} &= (95,97)\\ \text{group}_{50} &= (98,99) \end{align} and I think this works better.
Now from here I'm not sure how to progress, in fact I think this is the wrong path to go down but I don't know how to solve this in a different way. Maybe I could use the pigeon hole principle but I don't know how.
If you want no pair of integers to differ by two or less, then once you pick one integer in your set, you can't pick either number to the left or right of it. So it's helpful to think about picking 34 blocks of three consecutive integers: $(x-1,x,x+1)$ where $x$ is the number we're actually including in our set. The blocks centered at 1 and 99 can be thought to include 0 and 100 even though those aren't in our set. Just remembered we can't pick a block centered at 0 or 100.
Then notice that we actually can't have these blocks overlap either since if they did their centers would differ by two or less. So we can reformulate the problem as asking: is there a way to pick 34 blocks of three consecutive integers in the set $\{0, 1, \ldots , 100\}$ so that no two blocks overlap? The answer is no by the pigeonhole principle. We'd have $34 \times 3 = 102$ numbers in these blocks but only have 101 numbers in our set.
Edit: I actually had this exact question on my discrete math midterm in undergraduate and got completely stumped. Three years later I'm in a math PhD program hoping to work in combinatorics!
Edit 2 (cleaner, direct solution): We can split the set $\{1, \ldots, 99\}$ into the blocks: $[1,2,3], [4,5,6], \ldots [97,98,99]$. There are 33 blocks. If we pick any 34 numbers from this set, then we will pull two from the same block by the pigeonhole principle. But then these numbers would differ by two or fewer.