A single object pronoun in French is easy — it just slots in right before the conjugated verb. The trouble starts once two pile up at the same time, because French doesn't always put the indirect object pronoun in the same slot relative to the direct one. Whether lui and leur land before or after le, la, and les depends entirely on which pronoun is doing the indirect-object job.
Me, te, nous, vous, se always come before le, la, les. Lui and leur come after le, la, les instead — and y, then en, trail behind everything else in the stack.
1st/2nd person (or reflexive) pronoun + le/la/les
le/la/les + lui/leur (3rd person indirect)
Il me le donne quand je le demande, mais il le lui donne seulement si elle insiste.
He gives it to me when I ask, but he only gives it to her if she insists.
Same verb, same two objects, same meaning of "give it to (someone)" -- but swap the recipient from "me" to a third person like "her," and the order reverses: "me" can never follow "le"; "lui" can never precede it. Y and en, when they show up alongside other pronouns, always trail at the very end of the stack, after both of these pairs.
Take the quiz and see if you can get the pronoun order right every time.