"Are you going to send them a gift?"
Translation:¿Tú les vas a mandar un regalo?
It depends on the conjugated verb before the infinitive. Some verbs require an "a" after the conjugated verb and before the infinitive that follows. Here is a list of verbs that do require the "a": https://www.spanishdict.com/answers/275119/learning-post-spanish-verbs-that-require-the-preposition-a-when-followed-by-an-infinitive
There are some general rules, but they get more complicated for questions. Duolingo has chosen not to burden students with grammar terms and discussions. For people who are not put off by technical discussions of grammar, I'd suggest looking at other sources.
It's not exactly the best answer, but for me, leaving out the subject pronoun makes everything simpler, and it's actually the way most people would say it. In a sentence like this, the main question I would have is where to put the "tú".
When I leave the "tú" out, I have the two choices of "les vas a mandar un regalo" and "vas a mandarles un regalo" (I use the second form more often--it matches the English order better, and since the "les" is attached to the infinitive, there's no question about where to put it). Much easier!
Here are a couple of basic guides for word order: https://www.happyhourspanish.com/spanish-word-order/ https://www.thoughtco.com/word-order-in-spanish-sentences-3079451
Yes, in English we use the same pronoun, them, for both direct and indirect objects. An indirect object answers the question "to whom" or "for whom". A direct object answers the question "what" or "whom". For example, if you say "I hit them", "them" answers the question "What or whom did I hit?", so "them" is the direct object in that sentence.
In "you send them a gift" (I'm simplifying the sentence a bit), you can ask "What are you sending? A gift!", so you know that "a gift" is the direct object. And "To whom are you sending it? To them!" tells you that in this case, "them" is an indirect object.
You can learn more about direct and indirect objects at places like this: https://grammar.collinsdictionary.com/easy-learning/direct-and-indirect-objects
The main thing to understand here is that when English has "going to" followed by a verb (in this case, "going to send"), Spanish uses a present tense form of ir (to go) followed by a and an infinitive. Since the subject is "you", you can use any "you", but we'll use tú to be consistent with your answer (and Duolingo's).
So we say "tú vas a mandar" for "you are going to send". We don't translate the "are" part of "you are going"--the present tense is enough. To fill out the rest of the sentence, "tú les vas a mandar un regalo" means "you're going to send them a gift", but if you make it a question, then "¿Tú les vas a mandar un regalo?" is "Are you going to send them a gift?"
You just need to remember that "I'm going to walk" is "[yo] voy a caminar", "he's going to read" is "[él] va a leer", "we're going to arrive" is "[nosotros] vamos a llegar", and so on.