L298 is not the best full bridge unless it for higher voltage since it is only rated for 2A with 4.9V total drop and thus the VI loss itself is like a 2.5 Ohm power resistor. A MOSFET bridge is far more efficient. so if you motors are rated for they are a poor match for 12V motors.
That being said the brake R is determined by the max colling heatsink for 2Adc with total resistance in both coils 7.1V drop on the motor 2A. then using current sensing and PWM, regulate the current to 2A until stopped.
Lets say the motor DCR of both coils is 1.5 ohms then the surge current is 7.1V/1.5A% to maintain 2A.
If you can afford and want full power consider. http://www.robotshop.com/en/sabertooth-dual-5a-motor-driver.html
A cheaper solution is two of these https://www.amazon.com/dp/B01H1W79S0/?tag=stackoverfl08-20