Use o お in begin of these questions phrases
A: お名前は?
B: ペドロです
A: お国は?
B: スペインです
From what I know, the お work as a honorific of respect, then, it is used only in formal phrase. But, this phrases do not seem to be formal.
These お are meant to be put on the nouns, 名前 and 国, and is nothing to do whether it's interrogative.
This kind of お (and ご basically for kango, or sometimes it's to do with customary, likely for the easiness of pronunciation) is for the purpose of politeness. They makes the standard language to talk to people, equivalent to です・ます style. They are called 丁寧語{ていねいご}.
敬語の一。話し手が聞き手に対し敬意を表して、丁寧にいう言い方。
(ていねいご【丁寧語】| デジタル大辞泉)
We also put お to nouns even when there's no need for paying any respect, and these cases are called 美化語{びかご}. All these, now-a-days, are after all about how you want to present yourself; you can create good impression of yourself if you choose to use these words.
the お prefix makes the word 'honorific', which in practice means that the word translates to 'your name'.
these phrases do not seem to be formal.
-- "Formality" and "Politeness" are not the same thing.