どうしたの and どうしたのか are the same except that the latter is usually regarded as the literary style. The のか style is fairly bookish and stiff at the end of a sentence, but it's less so in the middle of a sentence. Here, どうしたのって and どうしたのかって are almost the same except that the latter may sound a little more serious/formal.
- 昨日は何食べたのって聞かれた。(informal)
- 昨日は何を食べたのか(と)聞かれました。(formal)
(But is that really a rhetorical question? A typical rhetorical question is something that implies "no". Something like 誰が分かるのか ("Who knows?") is a rhetorical question because it implies "no one knows", but in this case どうしたの is just an ordinary question and it does not imply "nothing happened" or "nothing is wrong". Person B simply quoted it without changing the meaning of the question itself.)
You probably know this, but if だ/です were used, it would add a nuance of accusation/shock (see this).
- どうしたのだって?
- どうしたのかだって?
- どうしたのですって?
- どうしたのかですって?