So if the best overall defender will guard the best offensive player, what's the difference between box in the perimeter and box inside?
The difference is that with one box your defender will guard the best Guard, and with the otehr one the best Big.
the +1 will guard only the outside/inside shots depending on the box choice?
No, he will defend all the shots of his opponent. It doesn't matter if it's a 3pt or a dunk.
if the offensive player is a SG and your +1 is also a SG with 20 OD (a match in favor of the defense), what will be the difference between the box defenses?
The difference is that with one box, your SG with OD will defend the SG and with the other one he will defend the PF or C (best inside player).