They aren't at an actual amusement park. A's "which" question is like showing B a list of all the rides at amusement park, and saying "which item on this list is your favorite?" B can point to the roller coaster and say "this one" or he can simply say "the roller coaster". Either way, B is referring to one specific item on the list of choices, so he uses "the", not "a".
Even without a physical list, a "which" question offers you a list and asks you to choose one. So "the" in the answer is correct.