Specifically in your examples, その/それ is the natural and neutral choice, but この/これ can be used, too. その/それ is often the safest choice that corresponds to English "the", "it" or "its".
あの/あれ and この/これ are chosen depending on the "psychological distance" between the speaker and the object in question. It's hard to generalize, but if the object is psychologically close only to the speaker (e.g., when it's natural to make a gesture of holding it), この/これ tends to be chosen. あれ is used to explicitly indicate there is a distance.
- あの人とは先週会ったが、二度と会いたくない。
I met that person a week ago, and I never want to see him again.
- あの本の名前ってなんだっけ。先週一緒に読んだあれ。
What's the name of that book? The one we read together last week.
- ええ、その曲は3年前に私が作りました。これは私のお気に入りの曲です。
Yes, I made that song three years ago, and it's my favorite.