How clean Trans fluid that spilled in a trunk?

How much spilled? It might be easier to replace it all. The “wood-like” material is probably masonite or something like it. You can buy a half sheet or so at most any building supply, trace the old one onto the new, cut it out and then transfer or recreate any kind of brackets, bumpers, etc. You can also use something sturdier like a piece of luan plywood.

Then you can also buy auto carpeting. You can buy custom fit for many vehicles, but that is likely more expensive than just buying the right sized swath and cutting to fit.

This would neither be all that difficult, nor all that expensive. But if you’re determined to save what you have, I’d likely try starting by soaking down the area with an automotive degreaser, scrubbing, and then sucking out as much as possible with a shop vac (or vac that can do wet). Then gradually moving down to weaker and weaker detergents ending with some basic carpet cleaner. Any or all of this will likely discolor the existing carpet, and I doubt that you will get it out of the masonite.