Yes, false life and Heavy Armor Master work together.
Temporary HPs function exactly as normal HPs, except that they are designed to be lost first, before applying residual damage (if any) to your normal hit points. They are not to be mistaken for damage resistance, which is the ability to halve the damage taken in some situations, or damage reduction, which is the ability to reduce the damage taken by a fixed amount. All of them, however, should stack.
Player's Handbook (p.198)
When you have temporary hit points and take damage, the temporary hit points are lost first, and any leftover damage carries over to your normal hit points. For example, if you have 5 temporary hit points and take 7 damage, you lose the temporary hit points and then
take 2 damage.
If you possess some form of damage reduction, like the Heavy Armor Master feat, or some form of damage resistance, like the rage ability, you apply these effects first, just like you would when receiving damage normally (remember that, as per the rules found on p.197 of the PHB, damage resistance is the last modifier to be applied to damage taken). In effect, temporary HPs are a way to magically augment your ability to take punishment.
Contrast this situation with an abjurer's Arcane Ward. In this ability's description, the ward is described as a separate construct having it's own set of HPs, rather than giving you temporary HPs. As such, one could possess both an Arcane Ward AND temporary HPs (although temporary HPs from different sources still wouldn't stack), but the ward shouldn't, at least according to RAW, benefit from damage reduction or resistance effects. Indeed, it is not you taking the damage, at least until the ward breaks.
This is answered on page 198 of the PHB under the section titled Temporary Hit Points:
If you have temporary hit points and receive more of them, you decide whether to keep the ones you have or to gain the new ones. For example, if a spell grants you 12 temporary hit points when you already have 10, you can have 12 or 10, not 22.
Meaning that you choose which source to keep when you gain the temp HP and the other lot disappears. You don't have two separate pools and they don't stack so you either have the temp HP you gained from False Life or the temp HP gained from Armour of Agathys, not both.
Your option A is correct
You do not retroactively take the damage that you lost the first temporary hit points from, since that damage has already been resolved. You can cast false life (via the Fiendish Vigor invocation) again to gain more temporary hit points, which does not in any way interact with damage taken previously.
The rules for temporary hit points state:
They effectively take the damage for you, so it's as though you were not damaged.
The temporary hit points are lost first, but nothing suggests that this has any later effect on your real hit points.
This just confirms that you would have to choose between your previous 8 (if you were not damaged) and your new 5. However, since your question states that you took 8 damage, you're effectively choosing between 0 and 5, or rather, you have no temporary hit points, so you just get 5.
This also proves that it's not option B because you have no temporary hit points anymore, so you cannot choose between your previous 8 and your new 5, because you currently have 0 (i.e. you do not have any temporary hit points and therefore have nothing to choose between; you just get 5).