Leeds progressed to the third round of the Capital One Cup with a hard-fought 3-1 win over Yorkshire rivals Doncaster.