If it all this suit cost Best Buy were the damages and penalties we already know about, then they are already close to wiped out on the deal (27MM vs. ~35MM, less legal). But that still doesn't capture it, because Best Buy spent money to clone this startup's offering and also to run the company and keep the lights on in the stores, which are expenses not captured in Best Buy's gross margin.
Incidentally, the 22MM figure also didn't get pulled out of some judge's butt. If you read the jury's finding, it's the amount of unjust enrichment Best Buy achieved by misusing Techforward's property.
In the very worst case scenario, virtually every penny of profit from this program was redirected from Best Buy to the winners of the lawsuit. But it's even more likely that Best Buy took a bath even beyond the imputed profits we're talking about.