Hosmer drives in 4 runs, Royals beat Dodgers