Questions & Answers about Ten karton jest cięższy niż tamten, bo są w nim książki.
They are demonstratives:
- ten = this
- tamten = that
So the contrast is:
- ten karton = this box
- tamten = that one / that box
In this sentence, Polish is comparing two boxes: this one and that one.