Maybe they shouldn't have been in this profession at all and find a different line work. Jobs are not guarantees, you are not owed anything. If their job got h1b-ed then it doesn't need to exist. It's the typical dare-i-say, [mostly white american male] entitlement, that anytime they didn't get what they wished for, and <ka-boom>, the world's ending, h1b is worse than corona + isis combined! Welcome back to ground level folks.
"breaking the law" imho, that probably too strong a phrase. Sure - we can argue about what that proportion is - but i think h1b recruits are - like most things in life, normally distributed talent/salary wise. The bottom 2-3 sd should never have been issued visas. True that, but with that comes the better 1-2 sigma that starts businesses, does research in Univs and businesses.
Now IBM et al might not be doing what you like, but to accuse them of completely illegal behavior is a stretch & half. There are never any solutions, only trade-offs!