"Señor, ¿escribe usted un libro?"
Translation:Sir, are you writing a book?
Verb tenses cannot be translated 1:1. I agree that Sir, do you write a book? would be better to learn, but you have to understand that sometimes Presente de Indicativo = Present continuous. In this example, the man started writing a book and haven't finished it, so in English we would say are you writing a book. However, as he is not currently writing this book while we speak, in Spanish we say escribe usted un libro.
He is writing a book in general but that's not what he is doing this very second. You only use the present progressive form (está escribiendo) if the subject is actively doing the action. :)
It's explained a little more on the bottom of this page: https://studyspanish.com/grammar/lessons/presprog
The he/she/you (formal) form of a verb (escribe) in Spanish can be translated as the present form (you write or you do write) OR it can be translated as the present progressive form (you are writing). In this case, the latter (you are writing) makes more sense in the context of the sentence so it should be used. But I do think the literal translation should be accepted as a possible answer. *This is how my Spanish teachers have taught it. I'm proficient in Spanish, but not fluent.
I think this is one of those situations when it is difficult to keep tenses the same whilst trying to convey the same message. "Sir, do you write a book?" is not something that is commonly said in English with "Sir, are you writing a book?" being the preferred way. But, we are here to learn about Spanish.
It definitely is not the wrong tense.
In English we are very used to compound tenses and even though many other languages support them, they are not used in the same way as English.
Another language altogether would say this as:
Ĉu vi skribas un libron?
Using the present tense. It also happens to support:
Ĉu vi estas skribanta un libron?
However it's definitely not required and is out of the norm enough to at least sound wierd to those who hear it.
We need to remember that we are learning Spanish here, not English. In many languages the constrution of sentense does not directly indicate if the speaker has finished or is in the process of doing something. Just remember that in many languages present simple is equal to present progressive.
Present tense in Spanish can be either present or present progressive in English. (And also some other tenses, but let´s keep this simple.)
In English, we would be very unlikely to say "do you write a book?" We might say "Do you write books?," but would not phrase the question that way when asking about one book. We would be likely to use the present progressive and say "Are you writing a book?," however.
I'm not sure where you're getting "to" from. I don't see anything that would usually be translated as "to" anywhere in the sentence.
Spanish often marks questions by placing the subject after the verb.
"Escribe" is the corrrect conjucation of "escribir" to use with "usted."
Thus, a literal, but grammatically correct translation would be "Sir, do you write a book?" We would normally phrase this type of question in the present progressive in English, however, so a better translation would be "Sir, are you writing a book?" (Spanish often uses the present where English would use present progressive.)