There are two problems with your code:
1. In a Calculation script one should apply the new value using event.value, not by using the getField method.
2. You should convert the value of "Remaining Balance" to a number explictly.
So the code should be:
var b = Number(this.getField("Remaining Balance").value);
if (b > 3000){
event.value = 3000;
} else event.value = b;