According to Appendix B-The Tale of Years from The Lord of the Rings, Frodo left Bag End September 23, 3018 of the Third Age.
Frodo reached the Morgul Road at dusk on March 9, and passed the Crossroads and Minas Morgul the next day. On March 13, he was captured by orcs and taken to the tower of Cirith Ungol, a tower in the Ephel Duath (Mountains of Shadow), the mountains that bordered Mordor to the West.
Frodo and Sam escaped from Cirith Ungol March 14, 3019, and began their journey along the Morgai, the smaller mountain chain behind the Ephel Duath. Three days later, on the 18th, Frodo had crossed the Morgai, and was caught on the road to Udun in the north of Mordor.
So it depends on where you consider Frodo to have entered Mordor. If he reached Mordor March 10, when he passed Minas Morgul, it took 5, 30 day months and 17 days. If he reached Mordor March 13, when he was taken to Cirith Ungol (or before that, on 12th, in Shelob's lair), it took 5 months, 20 days to reach Cirith Ungol, and 5 months, 22 days to cross the Morgai.
Until the end of The Return of the King, when he went to the Undying Lands with the elves and Frodo.
They enter in pairs because Gandalf tells them to do it. They don't want to go in all at once, so Beorn will think they were trying to kill him The dwarves must enter Beorn's house in pairs so that, as Gandalf tells their tale to Beorn, each entrance does not seem very imposing and Beorn's interest in the story is built up. Then the group will be able to stay with Beorn.
The coincidence that helps the dwarves during their stay at Rivendell is when the moon comes out while Elrond is looking at the map. It has moon runes on it with extra information. This helps them along the journey to get to the treasure.
They have several stops where they get out of the weather and get some sleep. They go to Rivendell once. They stay at Beorn's house. They stay in a cave but that turns out to be a bad idea because they get kidnapped by goblins.
Gandalf is worried that Smaug may become an ally to the newly returned Sauron.
17 days
Until the end of The Return of the King, when he went to the Undying Lands with the elves and Frodo.
Gandalf and Bilbo stayed at Beorn's home for one week on their way back to Hobbiton
Bilbo travels with Gandalf and Beorn to the long north pass around Mirkwood. Then they stay at Beorn's house for the winter. Then Gandalf and Bilbo travel to Rivendell, there Bilbo gets medical attention. Then Gandalf and Bilbo travel the long way to the Hobbit lands.
They did not take Gandalf's and Beorn's advice to STAY ON THE PATH while traveling through Mirkwood.
It does not give a precise length of time on their way out, but looks like 17 days based on the conversations. They left on Midsummer's Day. On the way back home with Gandalf he spends a week there.
They enter in pairs because Gandalf tells them to do it. They don't want to go in all at once, so Beorn will think they were trying to kill him The dwarves must enter Beorn's house in pairs so that, as Gandalf tells their tale to Beorn, each entrance does not seem very imposing and Beorn's interest in the story is built up. Then the group will be able to stay with Beorn.
Gandalf proves to be a very good manipulator when talking to Beorn because of how he brings the Dwarves in at very high points in the story. He does this so Beorn would stay interested in the story. I hope this answered your question:)
They don't stay anywhere for 15 days. They are in Rivendell for 17 days, and in Lake-town for 20. They only stayed a short time with Beorn.
The coincidence that helps the dwarves during their stay at Rivendell is when the moon comes out while Elrond is looking at the map. It has moon runes on it with extra information. This helps them along the journey to get to the treasure.
They have several stops where they get out of the weather and get some sleep. They go to Rivendell once. They stay at Beorn's house. They stay in a cave but that turns out to be a bad idea because they get kidnapped by goblins.
Stay with them at the camp rather than return to the dwarves.