Listen to Larry!!!
DO NOT try to install the gear with the cam in the engine. Pull the cam & take it, with your new gear, to a Machine Shop & $20 later your done.
You can install the new crank gear (a must) yourself with it in the engine.
Please don't be; "penny wise-pound foolish" here.
Good luck.
