I would confine the infant, not the 2 1/2 year old. He is not being malicious, and he can't learn if he's confined.
Some people don't have as good of a spatial awareness. How are his motor skills? Does he seem "floppy" or "noodly"? He may have some minor gross motor delays (my son did, he's a sniper in the army now, at 19). It could also be a vision issue.
Or, it could be nothing at all and he is just unaware. I can be like that from time to time myself...