Newcastle United got back to winning ways with a 3-1 victory at Upton Park which pushed West Ham United into the Premier League drop zone.