At some point, James probably asked Sirius to teach him how to dance, and Sirius did. Then James went and used his new skills to seduce Sirius' little brother.