1. What do you think her name is? grammatical
2. What do you think is her name? Not grammatical
3. What do you think the toughest race is in sports? Not grammatical
4. What do you think is the toughest race in sports? This is correct, grammatical.
Actually I've learned 1 and 3 are grammatical but found sentence 4 in a textbook. Please let me know which of them