1 Kings 22:51-53
Ahaziah the son of Ahab began to reign over Israel in Samaria the seventeenth year of Jehoshaphat king of Judah, and reigned two years over Israel. And he did evil in the sight of the LORD, and walked in the way of his father, and in the way of his mother, and in the way of Jeroboam the son of Nebat, who made Israel to sin: for he served Baal, and worshipped him, and provoked to anger the LORD God of Israel, according to all that his father had done.2 Kings 3:1-3
Now Jehoram the son of Ahab began to reign over Israel in Samaria the eighteenth year of Jehoshaphat king of Judah, and reigned twelve years. And he wrought evil in the sight of the LORD; but not like his father, and like his mother: for he put away the image of Baal that his father had made. Nevertheless he cleaved unto the sins of Jeroboam the son of Nebat, which made Israel to sin; he departed not therefrom.Notice that in the first one of these two, one might think that "For he served Baal," might refer back to "the way of Jeroboam." However, when you see the ending of the sentence in the first passage, you see it is connecting back to what Ahab did. That becomes even more clear in the second passage.
In the second passage, Jehoram is (to a degree) commended because he did not go to the extent of sin that Ahab and Jezebel went. Nevertheless, he still did what Jeroboam did, and worshiped God in violation of the second commandment.