filings are probably from the cone clutch
and if just the cone is worn out it's about a $1000 rebuild
but if the surface that the cone relies on for the lockup is worn then that whole single
drive part must be replaced. Bearings and seals
are easy to get from a local bearing supplier but the gear and cone are "Yanmar OEM" and that's where you'll spend the big bucks.
Incidentally, regardless of whether you rebuild
or replace the gearbox pay very close attention to the instructions for setting up the arc
of travel for the shift control lever on the side of the gearbox, the arc
must be more than 38° from neutral to either ahead or astern and this is not easy to achieve if the cable and connections are worn and sloppy or the cockpit
control is worn out or restricted in its travel.
While the gearbox is out, take a close look at the damper plate for signs of wear too and grease the spline when you put her all back together.