Thanks for the answer, Brian.
I removed the background from the town picture using affinity photo. Saving it as a PNG so that it will have a transparent background is simply the only way I've learned so far. It sounds like you are recommending doing the overlay of the town onto the mountain scene in photo as well. That sounds like a much more efficient way to proceed, for sure, and doing that would definitely do away with the black line problem.
I have all three software tools and I'm trying to learn how to use them by watching videos on Youtube. I've only been working with them for a month, so I'm really clumsy, so far.
Thanks again for the reply. I appreciate any guidance that is offered.