Ahaziah did what the Lord said was wrong. He did many bad things, just as the people from Ahab’s family had done. He lived like this because his wife was from Ahab’s family.
I also found that some women are dangerous like traps. Their hearts are like nets, and their arms are like chains. It is worse than death to be caught by these women. God’s followers should run away from them. Let the sinners be caught by them.
But Jehoram lived as the kings of Israel and did what the Lord saw as evil. He lived as the people from Ahab’s family, because his wife was Ahab’s daughter.