Problem 1 EXTENSION

Here is a related question which builds on the previous one by introducing an interesting twist to the plot.

HINT