For all practical purposes, the prepositions "inside" and "within" are synonymous. "inside my head" and "within my head" mean the same thing. "inside the box" and "within the box" mean the same thing.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
But look, Just The Truth, I've made a Google search and here are the results:
“within two months” – 468 000 hits;
“inside two months” – 344 hits.
“inside of” wasn’t mentioned in the above question – it was about “within vs. inside”.