Direct and Indirect objects used together
Direct object pronouns and indirect object pronouns are often used together in a sentence. Indirect objects are to/for whom (usually a person) and the direct object is the thing involved. When used together, the indirect object pronoun comes first, followed immediately by the direct object pronoun. It may help to remember that people come first.
Ella  me  da  el libro.
Sub. I.O.  V.  D.O.
Ella  me   lo   da.
Sub. I.O. D.O. V.
In the second column above, the indirect object el libro has been replaced by its pronoun lo, and inserted after the indirect object pronoun and before the verb. This order (indirect, direct, verb) applies to all conjugated verbs.
Attention:
If both pronouns begin with the letter l, the indirect object pronoun (le or les) changes to se to avoid the repetition of the l sound. Add a él, a ella, a Ud., a Uds., or a ellos/as to clarify who is receiving the action.
  • Yo le doy el libro (a ella).
       I give the book for her.

  • Yo se la doy (a ella).
       I give the book for her.
  • Attention:
    In sentences using conjugated verbs and infinitives (-ar, -er, -ir) or the present progressive, both indirect and direct object pronouns are placed before the conjugated verb or attached to the infinitive. Both styles are correct Spanish.
  • Yo te lo quiero dar.

  •    I want to give it to you.
  • Piensa escribírmela.

  •    She plans to write me it.

  • Él nos lo está diciendo.
       He is telling it to us.
  • Estamos dándoselo (a él).
       We are giving it to him.