how do you do?
Where are you?
Just demonstrating that your questions must be more clear as to what type of answer that you are seeking.
"How do you do?" as a polite question in Spanish is:
Your second question is:
Johnny Cash said to his estranged father (in the song) "How do you do my name is Sue, now you're going to die" and there was nothing formal about that.
How do you do sounds a bit formal. If the situation is formal, then you might want to use cómo está.