You need to attach your pics in a way they can be enlarged. The internal looks straightforward, can't tell if the external is involute or not, but if it engages with some other cogs/gears then it probably is - look at this: -
Involute gear - Wikipedia, the free encyclopedia
As you can see this is a complex form and you would need a bespoke piece of tooling to produce it. You also need to know the relevant dimensions of the mating parts to determine the shape of each involute arc.
If the parts are very large (ie big enough to poke a milling head attachment into - can't tell from drawing) then the internal spline could be milled. Not the best way if you require job to be done with high accuracy though...
If components are small you need some kind of slotting machine - or better, a proper gear-cutting hobber - and the cutter profile you use will depend on that machine's capabilities as well as the other constraints of money/time and finish/accuracy required.
Of course you could clamp a basic tool directly to a spindle head/turret and use a CNC mill/lathe as a slotter if your friend doesn't mind...