In this situation I think the best decision is to conceal oneself and take a momentary wait and see approach. Maybe they would only steal a few items and leave. However, it would be tricky because if they start making their way up the stairs, you definately don't want a gunfight to erupt in an upward angle.
Of course bullets will go through floors, but it's less likely while everyone is on the main level. If you wait and see, one of them might head upstairs and then there's a real problem with the angle and with hostages.
I would try to silently conceal myself and/or move into position to have them both in the same sight pattern, take an aimed center mass shot double tap at one and then as quickly as possible shoot the other. If they were to separate, I would still try to take out the first and immediately take concealment hoping to ambush the 2nd as he either tries to flee or checks on his buddy.
I think the only survival here is surprising them from concealment. Hopefully the first volley of shots would wake someone and get LEO on the way, but that might take 10 minutes.