"Whenever" used as a conjunction has two meanings.
whenever....any time when (when and if)
-You can leave, whenever you want...... в любое время, когда захочешь
whenever.....every time that.
-In Petersburg he takes his umbrella, whenever he leaves the house...каждый раз, когда
If you look at the question logically, there are two clauses. 1) They are going to leave the area 2) they sell their house. Usually people leave the area AFTER they sell their house.
"When" and "whenever" can be used to refer to the future, thus "They're going to leave the area whenever they sell their house." means they are going to leave the area in the future when (after) the house is sold. This is probably the answer the author of the test is looking for.
These tests can be confusing even for native speakers. Often you can find a context where both answers are correct, especially if you have an advanced knowledge of the English language, and become a victim of overthinking. умничание
By the time....not later than a specified time; BEFORE, at, ON, or in a specified time.
"They are going to leave the area BEFORE they sell their house." This is not the usual order of events, but this statement could make sense as a prediction, because we don't know when they will sell their house.
-A fortune teller, after reading her cards, declares. "They are going to leave the area by the time they sell their house."
-You know that they have been trying to sell their house for a long time without sucess, so you predict, "They are going to leave the area by the time they sell their house."
"They're going to have left the area by the time they sell their house."
Use of the future perfect emphasizes that they will leave BEFORE the date of the sale, not ON the date of the sale.
The choice with BY THE TIME makes sense if you add additional context; however, there can only be one answer, and logic points to WHENEVER as the correct choice.