If A's speed is 50, and if its a linear evolution, then B width should be 93, not 57 and height should be 19.5, not 16.5.
Check again.
The formula can be something like this:
B.width = 36 + (A.speed * 1,14);
B.height = 36 - (A.speed * 0,33);
Edit: re-read and i think you want it to change exponentially, right? Let's wait then