With the same definition, switching A and B roles, we have p(A, B) = p(B|A) p(A) (2)
Plug (2) into (1) and you have Bayes rule.