Hanley Ramirez had three hits and drove in two runs playing for the first time against the team that traded him last month, and the Dodgers beat the Marlins 5-2 on Friday night, according to an ESPN.com report.