I believe "Det er hans kaffe"? is the indefinite form and has the indefinite version of the object which is "kaffe" and follows the subject "hans" whereas "Det er kaffen hans"? would be the definite form, therefore the object is in its definite form "kaffen" and precedes the subject "hans". The indefinite form is the more formal one and the definite version is the one you come across more often in Norwegian but someone please correct me if I'm wrong.
Possessives are sometimes so confusing and hard to remember for me so I have this page open and read it often: https://www.duolingo.com/skill/nb/Possessives/tips-and-notes