ok easy way to calculate battery "c" rating. take the capacity and devide by 1000. this will give you one "c"( there is actually a different way to do it that makes sense mathmatically but i forgot it lol) so lets do the maths. a 5000 mah battery with a 20 "c" rating 5000/1000: 5: 1"c" so 5*20 "c" :100 amps. so the battery you have can probably deliver 100amps con.
here is another example a 7500mah battery with a 90 c rating will give 675 amps con, cuz (7500/1000):7.5 then (7.5*90):675
usually batterys may have a burst c rating meaning if the 5000mah had a con of 20c it might have a burst of 30c or 40c theoretically it would say on the battery.
ok now the motor. motors draw amps when spinning under load. the amps that the motor draws fluctuates when driving depending on how much throttle you give and how hard the motor is working the amps for the motor are supplied by the esc. say the motor is drawing 90 amps peak- then you need an esc that is able to supply 90 amps.so then you might want a 120 amp esc. you want htere to be a difference in the motor draw and the esc capability otherwise you will have heat issues as the esc is opperating at peak already.