The M4050 uses regular tractor hydraulic & gear oil from Walmart, Agway, TSC etc. A 5-gallon bucket plus another 8-10 quarts should be enough to get up on the dipstick. For the engine Rotella 15w40 is available everywhere. Take out both engine drain plugs. These engines take 7-8 quarts. Check levels after running.
They are in plain view and near each other. The reason there are two is the engine has a tunnel for the front drive shaft, so there are two low point drains (common to many K engines).