5. Juan pensaba que Pedro le había dicho que la revisto había publicado ya el artículo.
Juan thought that Pedro to-him had said that the journal had published already the article.
Juan thought that Pedro had told him that the journal had published the article already.