I have a yeast on the trub from my 5 gallon batch fermentation. I want to reuse it for my next batches.
Is that ok if I add all of this yeast to my next batch?
Or is there any proportion I should follow?
No specific proportion. Quite a few people reuse the whole "yeast cake".
There are a few gotchas, though. One of them you kinda mentioned - it's not just yeast in the "cake", but all other stuff you don't want to bring to the next beer, like hot/cold break, grain particles, hop material. Another gotcha is that yeast in the cake is usually tired: it depleted nutrients, and is stressed from presence of alcohol and lack of oxygen.
Personally, after reusing various proportions of yeast cake over the years I discarded the whole idea. I'd rather make a starter from a test tube in my yeast library, and get fresh actively fermenting yeast that I'd pitch. That "actively fermenting yeast for pitch" seems to be an important thing.
Btw, Hieronimus in BLAM describes how monks scoop the yeast krausen from fermenting beers (almost with buckets) and pitch it to a next brewed wort. Obviously, for that you need to have a strong pipeline of brews using the same yeast, which is not always achievable at home, but you get the idea.
The Mr Malty yeast calculator (need flash installed) has an option to calculate how much yeast cake you should re pitch. Its a ballpark estimate since one yeast cake isn't the same as the next, buts it at least attempts to quantify how much you should use.
You can also scoop up some of the cake, put it in a glass jar with some water and shake it up, and watch it settle over a few hours or days. In the first hour, most of the trub will settle down. Then, like a light dusting of snow, the yeast layer will settle on that. Maybe there will be some other layers of stratified combinations of yeast and trub, but for the most part the stuff that settles first is mostly coagulated proteins / break material and hops aka trub. That stuff isn't going to help your next batch, and might even affect the flavor. This glass jar experiment is called yeast washing if you do it with sterile water and a clean environment, can get pretty pure yeast.
Of course there is possibly a greater risk of contamination if you go through steps to transfer yeast cake, wash it, reuse it. It also is another thing to keep clean and worry about. In the past I have dumped fresh wort right into the same fermenter on top of a cake (lazy way - also this is almost guaranteed to be overpitching, and get a less than healthy fermentation because the yeast doesn't replicate enough and its stressed out yet because theres so much of it it works so fast it blows up and is done too quickly and has done a sloppy job without cleaning up). I've also dumped 1/3rd of a yeast cake into a clean fermenter, the idea being that I get most of the top layer of yeast cake, and not the trub at the bottom layer. The best method for reusing yeast cake that I have found it to add some wort or beer, and slightly roll it around to get just the top layer of yeast off the cake and less compacted. Sort of a "wash in place" if that makes sense. Then dump that into my new aerated wort. I think its a good balance between effort and acceptable results.
When almost all professional breweries repitch, they either get the top krausen during peak fermentation, which is all nice active top of their game yeast, or else after fermentation they can drop the trub out the bottom of their conical fermenter, toss it, and finally after the trub layer is drained out the bottom it starts running clean yeast, they keep that part and use it immediately, or within a week or two.
I used to brew every weekend, and would have yeast cakes to repitch onto most of the time. Usually up to 3 generations before I'd want to switch strains. I probably saved a hundred bucks on not buying new yeast every batch, but I was never completely satisfied with my re-pitched brews and think this may have been part of the reason. If you're as cheap as me, its very tempting to repitch, but I think the best chances of making an award winning beer would be to buy the right amount of fresh liquid yeast and pitch properly.
What I do to save money is pull 3 to 5 liters of my cooled wort aside to make my starter. I pitch the yeast in this while my wort cools to its desired temperature, then pitch the whole starter when it is at high krausen, usually the next day or so. This gives me the best results yeast-wise and saves me money on DME. Pitching a starter made with new yeast at high-krausen will give you the best results overall. I think this is called a "viability" starter. Using a stir-plate will get you there faster but isn't truly necessary if you don't have one. Until I started using this type of starter all of my beers had a residual sweetness (that I didn't like) that I attribute to under-attenuation. My last four beers I've done this way and none have any residual sweetness.