"I was wondering what/which are ..." or "I was wondering what/which ... are"
I can understand saying "I was wondering how is A doing?" is not grammatically correct. Instead we should say "I was wondering how A is doing?".
On the other hand, I was wondering which one or both is grammatically correct:
- "I was wondering what are the differences between A and B?"
- "I was wondering what the differences between A and B are?"
In my opinion both are correct, and the first one seems more balanced the the second, as A and B can be long.
The problem with "I was wondering what are the differences between A and B" is that the segment "I was wondering" is a complete sentence and "What are the differences between A and B?" is a complete sentence. It sounds funny smushing them together without punctuation:
I was wondering: What are the differences between A and B?
I was wondering, what are the differences between A and B?
The problem disappears with "I was wondering what the differences between A and B are" because "What the differences between A and B are" is not a sentence and the whole sentence is more like the form "I was wondering what these are."
Restructuring a sentence because a bit in the middle is getting too long is okay to do but there are other ways to deal with the same problem:
I was wondering about A and B. What are the differences here?
Actually, I would prefer this variant:
I was wondering what the differences are between A and B.
Your #1 is incorrect. #2 is permissible, but as mentioned it may be difficult to parse when A and B
is very long.
Note that all of these sentences should be punctuated with a period, not a question mark.