The "correct" answer is wrong. It should be "Lui scrive un libro per loro".
its incorrect, it should be ¨lui scrive un libro per loro¨
for me, the translation is : lui gli scrive un libro
That would be "He writes him a book".
Thank you all for contributing. I'm REALLY NEW to Italian, and couldn't tell. I just chose the right verb form, without knowing any better.