I am going to give an answer based on the web site you are using. If you want more detail please ask. (FYI: There is book on the difference b/w は & が but I would suggest looking at a few of the Q&A on this website first and make a note of the comment from Tokyo Nagoya for future reference.)
The website you are looking at explains (quote):
"We ..use the topic particle [は]to explain the current topic of conversation.
Sample: 誰? (Topic: アリス) = アリスは誰?"
And later:
"the 「が」 particle is only used when you want to identify something out of many other possibilities”
If we apply these to the task given:
Line 1: "ジム) アリス___誰?" simply requires us to to refer to the example taken from the previous section to illustrate how to the topic particle is used. I assume this is clear but, just in case, Alice is the topic of the conversation because Jim is asking about her.
Line2: ボブ) "友達だ。彼女____アリスだ" is the application of the explanation quoted above:
We can infer from line one that there are several candidates who could be Alice, Jim is asking Bob, which one.
As per the explanation given, が is used to identify Alice from the possibilities given. I would guess from the information available that of the possibilities, at least one of these, but not all, is a friend. Bob's first statement ("友達だ”) is intended to help narrow down the possibilities. It does not say but perhaps they are looking at a photograph of several people.