Contradiction with Proverbs 28:9
This verse emphasizes that ignoring God's law makes prayer an abomination, whereas in 2 Kings 20:2, Hezekiah prays and God responds positively, despite not specifically mentioning adherence to the law.
Proverbs 28:9: He that turneth away his ear from hearing the law, even his prayer [shall be] abomination.
Contradiction with James 4:3
It suggests that prayers can go unanswered if asked with wrong motives, but in 2 Kings 20:2, Hezekiah's prayer for healing is granted, suggesting his motives were acceptable.
James 4:3: Ye ask, and receive not, because ye ask amiss, that ye may consume [it] upon your lusts. [lusts: or, pleasures]