Ch 12 tracks the unsuccessful reign of Rehoboam, the reason given is because his heart was not prepared to seek the Lord and his pride. Ch 13 is the record of Abijah who succeeds rehoboam, who is then followed by a Godly king in Asa. Amazingly Asa follows God even though the three generations before him did not.