I agree with athameg.
For me it seemed obvious that the final problem for Sherlock was to solve the puzzle of his own inner world. And if we remember, in the scene before Moriarty killed himself, he was ruminating about Sherlock being like him or not.
On the other hand, both "problem" involved the threat of his friends (and/or family), so decisions that concern love.
Maybe the final problem was if Sherlock could love at all. (Or is he really just a genious sociopath fooling us all along.) Maybe when Moriarty tested him choosing between the life of his own and his friends, it was part of Eurus's plan. I maybe overthink it, but I can imagine that she wanted to test his love and his genie at the same time. He either let his friends or himself die, he wouldn't be ready to save Eurus.