I can not see 40 hours doing it myself, but with a shop, should be less. Figure anything done is done with at least 2 people.
I don't know how your boat is configured, but if the trans can be removed without moving the prop shaft much, and blocking the motor, then figure 4 hours (x2=8). If boat needs to be dry docked, then more hours there. Assuming V-drive but does the prop shaft go thru the trans and attach on the back, or mounts flush on the front end.
Rebuild the trans is a one man job and to disassemble, clean and rebuild, maybe 14 for me, and 10 for them (x1=10). The trans is pretty simple and takes some skill but not a very high level. Just need to understand what is needed and how to measure tolerances.
Re-install, maybe 5 hours (2x=10)
So I'm seeing 30 hours max if boat does not need to be on the hard
If it needs to be on the hard, and the shop that is doing the rebuild, also is doing the dry dock (trailer) then I can see 40
Only way to see if you can get it done for less, check some places that will rebuild on the exchange. Send it off for rebuild, or send yours out and they send a rebuilt back. This way your just paying for the trans along with remove/replace, and not the local labor to rebuild