After Absalom killed his half-brother, he got out of town, and apparently set his sights on his father's throne. Perhaps he was emboldened to aim for that after he realized he had gotten away with killing his brother.
Now, Joab had constant access to David, and yet he was obviously hesitant to speak his mind before the king concerning Absolem. So, he set David up so that he would have an excuse to do what he wanted to do, but for some reason felt unable to do. Joab recognized that David missed Absalom but felt obligated to restrain himself because of what Absalom had done. So, Joab sent an actress in to pull at David's heart strings and to persuade him that everybody wanted Absalom to be brought back home. And, it worked.
David hesitated though, once Absalom was in the act of returning. He refused to allow him to come to the court. So, Absalom tried to use Joab to PRY his way back into the palace. Joab ignored him. He got pushy (he burned Joab's crops). Joab begged David to let Absalom come to see him. Absalom came to see his dad. Everybody lived happily ever after, right? Wrong. Absalom began to woo the hearts of the populace away from David, but that's another story.