Cost of XPS panels vs. sprayed closed cell foam
There's a sizable difference in how "tight" (well-sealed) you'll get a DIY installation, even with the tape and GreatStuff in your calculations, vs a proper closed-cell foam spray job.  In most homes air movement is as big of, if not greater, culprit for heat loss than passive heat loss.  So if the cost of DIY is even close to a pro job, then the pro job will pay for itself in spades.

However, 2" of foam is below what's required for code here in Illinois, if that's all the insulation the wall would have.  So check on that.  It's important you get the right amount of foam... if not then you can build up condensation on the inside of the foam and end up with mold.  There's a lot of misinformation out there about this, so the simplest solution is to just make sure you follow code.

Also, make an effort to check up on the contractor.  According to the experienced guys who did my house, if the two components of the foam aren't mixed just right, the foam can either not work correctly or spontaneously combust while curing.  I'm sure the latter is rare, but the former would be undetectable to the naked, untrained eye, I would imagine.