Jeremy Lin started RFA negotiations with only one deal; a customary qualifying offer from the Knicks of $1 million for one year. Since the Knicks could not right-out offer what many expected Lin to receive, they could only match. They told Lin to test the market and solicit a bid. Everyone expected the Knicks to match.
Of the teams that expressed interest, Jeremy Lin traveled to meet with only one team, the Houston Rockets. They made it abundantly clear that they wanted Jeremy as the starting point guard, envisioned a future for him, and were willing to make an offer reflective of that.
After that meeting Jeremy left for New York with an offer of $28 million over four years, though still unsigned. After several vocal comments by the New York front office about matching the offer and Jeremy definitely being back as a Knick, Houston upped their offer.
And that's when the Rockets changed their offer and asked Jeremy to come back. Despite what some Knicks fans believe, Jeremy could not go back to the Knicks and inform them of what was to come. Nor would it be realistic for him to decline the Rockets new offer on the pretence that it would be tougher for the Knicks to match.
The Rockets are looking out for the Rockets, and vice versa with the Knicks. Same for Jeremy, or any player who enters into negotiations. In contract negotiations, they have to act with honesty and good faith, with the intention of actually playing for that team.
Jeremy had two options: to sign the new deal, or decline and go back to New York with no deals for the Knicks to match. With no point guard, the Rockets' needs are what drove them to give their offer; there is no basis for assuming Lin was trying to play one team for the other. In the end, he only had one offer sheet available for him to sign.
Although some would like to villainize Jeremy Lin, in the end, Houston had to do what was best for itself. Whether Jeremy "preferred New York," doesn't mean anything to Houston; they made an attractive deal.
If James Dolan and the Knicks wanted Jeremy Lin back, they would've matched.