Mahalath gave birth to the following sons: Jeush, Shemariah, and Zaham.
Rehoboam married Mahalath, daughter of Jerimoth. (Jerimoth was the son of David and Abihail. Abihail was the daughter of Eliab, son of Jesse.)
After marrying Mahalath, he married Maacah, Absalom’s granddaughter. She gave birth to Abijah, Attai, Ziza, and Shelomith.
When the day comes for the father to give his sons their inheritance, he can’t treat the son of the wife he loves as if that son were the firstborn. This would show a total disregard for the real firstborn (the son of the wife he doesn’t love).