You have forgotten the 3rd one - these two objects are disconnected, and in this way - the lowest amount of polygons and no n-gons. This is more suitable for examples like this, then the addition to main surface is small.
In the second example not so many polygons are removed, because whey are going to be converted into triangles, so the front face has almost the same amount of polygons as in the first example. But basically the answer is it depends.
But I would prefer first example from this two, because:
- example like this is more suitable for animation
- may have fewer artifacts due to triangulation
- saving polygons is not so efficient as if you just make two boxes
- it is harder to work with n-gons (e.g. adding loop cuts), so second example is harder to maintain