"Then Nathan asked Bathsheba, Solomon's mother, 'Have you not heard that Adonijah, the son of Haggith, has become king without our lord David's knowing it? Now then, let me advise you how you can save your own life and the life of your son Solomon. Go in to King David and say to him, "My lord the king, did you not swear to me your servant: 'Surely Solomon your son shall be king after me, and he will sit on my throne'?" Why then has Adonijah become king? While you are still there talking to the king, I will come in and confirm what you have said.'" NIV translation
King David had promised Bathsheba that her son would be the next king but he had not made it official. In his old age, David evidently became forgetful (if not senile) and so he had not even thought about making his selection of successor public. The resulting power grab by Adonijah would mean death to other potential kings such as Solomon. Therefore, Nathan and Bathsheba decided to remind the king of his promise and by so doing save their lives as well as the life of Solomon.
"So Bathsheba went to see the aged king in his room, where Abishag the Shunammite was attending him. Bathsheba bowed low and knelt before the king. 'What is it you want?' the king asked. She said to him, 'My lord, you yourself swore to me your servant by the Lord your God: "Solomon your son shall be king after me, and he will sit on my throne." But now Adonijah has become king, and you, my lord the king, do not know about it. He has sacrificed great numbers of cattle, fattened calves, and sheep, and has invited all the king's sons, Abiathar the priest and Joab the commander of the army, but he has not invited Solomon your servant. My lord the king, the eyes of all Israel are on you, to learn from you who will sit on the throne of my lord the king after him. Otherwise, as soon as my lord the king is laid to rest with his fathers, I and my son Solomon will be treated as criminals.'" NIV translation
Bathsheba went to the king and reminded him of his promise to her. She also informed him of what was happening in his kingdom. Finally, she plead for him to take action to make his choice of heir to the throne public. She reminds him of his responsibility and that, if he fails to do so, she and Solomon will probably be killed.
"While she was still speaking with the king, Nathan the prophet arrived. And they told the king, 'Nathan the prophet is here.' So he went before the king and bowed with his face to the ground. Nathan said, 'Have you, my lord the king, declared that Adonijah shall be king after you, and that he will sit on your throne? Today he has gone down and sacrificed great numbers of cattle, fattened calves, and sheep. He has invited all the king's sons, the commanders of the army and Abiathar the priest. Right now they are eating and drinking with him and saying, "Long live King Adonijah!" But me your servant, and Zadok the priest, and Benaiah son of Jehoida, and your servant Solomon he did not invite. Is this something my lord the king has done without letting his servants know who should sit on the throne of my lord the king after him?'" NIV translation
Nathan had earned the trust of the king as he had been the one to go to the king and call him to repent for his adultery with Bathsheba and his murder of her husband. Now, he confirms the power grab that she had told him about and asks if this is on orders from the king or not.