" So you could call it a demonstrative adjective. "This" and "that" can also serve as pronouns, but in your example they're adjectives because they modify nouns. They could refer to physical distance, as the near one vs.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.