When we arrived, he was making coffee vs. When we arrived, he had been making ...

Hi,

When we arrived, he was making coffee. OK. Can I also say “When we arrived, he had been making coffee”?

Thanks in advance. Cheerio

He had been making coffee until I arrived.[YSaerTTEW443543]

TOEIC short conversations: Company executive gives recommendations on what to order at business dinner.[YSaerTTEW443543]

I see nothing wrong with
‘When we arrived, he had been making coffee’ (the assumption being that he then stopped making coffee).

It cannot replace the original though, as that does not carry the assumption that he stopped making coffee upon ‘our’ arrival.

Hi Bev and Torsten, thanks for your precious help.