As far as I know, Jeremy Lin's hit on the cap will be $8.3 million these two upcoming seasons, not $5 million and then $15 million had the Knicks matched the Rockets' offer.
I think the wacky thing about all this is that Rox GM Daryl Morey is grabbing just about any attractive player he can find, but there is a disconnect between the players he's acquiring and compatibility with the Rox offensive system, which is maybe the most unorthodox in the league. Lin's strength is his midrange game, and Morey grabbed him to play in a "layups and threes" offensive system. When he then acquired James Harden, Lin's assignment was mainly shooting spot-up 3s, which was never a strength of his. Lin's midrange plays were all but muzzled in the Rockets offense.
The big negative with Lin, as I now see it, is while he's talked about improving his jump shot and left hand, the games simply don't bear this out. Lin's weaknesses haven't improved at all since joining the Rox. So either his ceiling is lower than first thought or his work ethic isn't as great as first thought. (If Lin were to stay on the Rockets, he MUST improve his 3pt shot.)
Lin also has developed some bad habits this past season. His jump shot release was a lot slower than it was with the Knicks, and defensively, Lin slacked off the latter part of the season. Although he'd never say it publicly, I really believe Lin was really uncomfortable playing under Coach Kevin McHale. (If you remember all those alley-oops Lin executed with the Knicks, he executed only one all season with the Rox. McHale really dislikes Lin trying "home run" plays.)
If you go to the Rockets forums, fans there want Lin gone. Coach McHale has benched him in the 4th quarter in games for playing poorly in the first three..... (I guess McHale never watched the Knicks-Sixers game on 3/21/2012.) And Ray Felton has made Knicks fans say "Jeremy who?" ..... I think Lin would be best off on a different team, but not necessarily the Knicks.
Summing up, Lin's "poison pill" contract might ultimately end up being poison for Lin himself.