how did the war with mexico lead to conflict between the north and the south?

Texas was pro-slavery.

http://www.pinzler.com/ushistory/timeline5.html