The person told The Associated Press on Thursday on condition of anonymity because the team hadn't officially announced the deal.
Lin can sign the offer sheet with Houston on July 11, and the Knicks will then have three days to match the offer.
The Knicks have repeatedly said that they plan to keep Lin.
The contract is worth $10.2 million over the first two seasons and $9.3 million in each of the last two years. The fourth season is a team option.
The person also told the AP that the Rockets traded Kyle Lowry to Toronto on Thursday for a future first-round draft pick with lottery protection and forward Gary Forbes. Lowry averaged 14.3 points and 6.6 assists in 47 games for Houston last season.
The Rockets had Lin in training camp, but waived him because they had already had Lowry and Goran Dragic on their roster. Now that they've traded Lowry, and with Dragic headed to Phoenix, Houston is trying to get Lin back.
Lin was claimed by the Knicks after the Rockets let him go and soon became New York's starting point guard and "Linsanity" ensued.
He averaged 14.6 points, 6.2 assists and 3.1 rebounds in 35 games with 25 starts before his season was cut short because of surgery to repair torn cartilage in his knee.
Lin, who went undrafted out of Harvard, became a sensation with a remarkable stretch in February where he scored at least 20 points in nine of 10 games. A high point of that span came when he scored 38 points with seven assists in a 92-85 win over the Lakers on Feb. 10.
The Rockets are already popular in Asia because of the career of former star Yao Ming, who retired in 2011. With Yao's retirement, Lin could add to their appeal there as the first American-born player of Chinese or Taiwanese decent.
AP Sports Writer Chris Duncan contributed to this report.Suggest a correction