The Lakers get Lin, who is still developing his point guard skills. He worked out well with MDA in New York and he should do well with him again. He'll be able to run the offense and develop further with Kobe Bryant helping him.
Steve Nash is seriously declining and will be even further next season and needs to be put in a reserve role.
Lin would work out well with either Gasol and/or Howard in the pick and roll and he can get to the rim, which is something the Lakers don't have anyone who can do this right now.
When Kobe comes back, Lin's role as scorer in reduced, but his role as point guard is expanded.
The Rockets turn the point guard duties over to Beverly with Blake as a reserve.
I doubt the Rockets would do this because Nash is old.
Nash at this point would still be a good backup for the Lakers.
Also I doubt the Lakers would do this since he took a paycut to play in LA, and there is an unwritten rule that teams don't trade guys that do that. But you never know.