For <em>company</em><em> A</em>, you are multiplying 20 by h because you must pay $20 per hour. Then, you have to add 100 to that because there is a $100 dollar rental fee.
For <em>company </em><em>B</em>, you are multiplying 40 by h because you must pay $40 per hour. There is no rental fee, so that means you don't have to add anything.