Swansea claimed the South Wales derby bragging rights with a 3-0 win over Cardiff to return to the Championship play-off places.