The given sentence is in Interrogative form. In such cases, 'said/said to' becomes 'asked', 'enquired', etc. in the Indirect form, and the verb follows the subject unlike in the Direct form. Accordingly, the sentence that follows the afore-mentioned grammatical rules of Indirect speech is option (d), 'Joey asked the girl how she was doing'. Though option (b), is a closer option, it can be noted that the verb precedes the subject in it and so, it is negated. The other two sentences do not follow the grammatical norms for Indirect speech and so, they are negated.
Hence, the correct answer is option (d).
Note:
Direct and Indirect Speech: We use direct speech when we repeat someone's words and indirect speech when we use our own words to report what someone says. For Example: Direct speech: 'I like watching movies,' Seema said; Indirect speech: Seema said she likes watching movies.