Tenach seems to have some inconsistencies. For example Melachim 1 chapter 3 and Divrei Hayamim 2 chapter 1 have G-d saying different things to Shlomo and Shlomo saying different things back. Even if there are explanations for these differences, why would Ezra write Divrei Hayamim in such an unclear way? What was he trying to achieve?
In Judaism we don’t shy away from questions, and to the contrary, we encourage them, for they help reveal the ultimate truthful commentary. Just about all of the questions asked by modern Bible critics have been asked and answered previously by our rabbis over 3,300 years of universally famous inquisitive scholarship, and your question is no exception. Divrei HaYamim, which is the transitional “seam” between the end of the written Tanach and the beginning of the rabbinic midrash, itself was written for midrashic purposes (Vayikra Rabba 1, 3), and accordingly, it’s literal meaning is less significant than the other books in Tanach. Alternatively, the famed gaon the Sha’agat Aryeh, posits that Ezra didn’t write Divrei Hayamim, but just copied it from different texts that were around from before his time. Regarding your specific question, as is often the case, the accounts in the two books compliment each other and a careful reading shows there are no contradictions. In general, we can see several stresses in Divrei Hayamim which explain why Ezra and his court wrote them: they stress the yearning and importance of three things which were missing during the 70 years exile in Bavel, from where they just returned: a. the Beit HaMikdash b. the Kingdom of David and Yehuda (Judah) c. and prophecy. Another difference is the perspective of time which sees the Kingdom of Israel of the ten tribes in a different, more negative light.