Since Ahaziah was related to Ahab's family, he acted just like them and disobeyed the LORD by doing wrong.
Jehoram disobeyed the LORD by doing wrong. He married Ahab's daughter and was as sinful as Ahab's family and the kings of Israel.
Here is what I discovered: a bad woman is worse than death. She is a trap, reaching out with body and soul to catch you. But if you obey God, you can escape. If you don't obey, you are done for.