Rebuilding the section that was dispersed into space might be a breeze: the real world is replete with examples of a navy taking an already partially completed ship section from another production line and grafting that onto a hurt vessel that is in more immediate need of, say, a new bow. For all we know, Starfleet had the missing girders and plates in stock and could install them in a week.
Repairing whatever was bent and twisted in the surviving parts of the ship might well take a lot longer, though. And if Starfleet had enough off-the-shelf spares to repair all that through 1:1 replacement, they might be better off just building a new Sovereign class ship out of those and placing the Enterprise at the very end of a long repair queue!
Three months might be fine - but it could serve your dramatic purposes if the end result of three months of repairs would be an only partially repaired starship, one that suffered from known and unknown performance shortcomings as the result of the earlier damage and the incomplete repairs. You could argue that full repairs would have taken five years and that this would not have been cost-effective...
Partial, hasty repairs would make sense if Starfleet considered the Enterprise so prestigious she had to be made spaceworthy on short notice no matter what.
Of interest might be that the ship already underwent quite a change from ST:INS to ST:NEM. And I'm not talking about a few extra torpedo launchers here (launchers that might well have been there all along anyway). The engine pylons were redone and the secondary hull shape was altered - a massive change that might well exceed the ST:NEM repairs in scope. Was that done in response to catastrophic damage, too? If it was done for the sake of tinkering, then Starfleet clearly has capacity to burn, and the ST:NEM repairs might take all of a weekend!
Timo Saloniemi