An easy way to do it would be to add an on-change nanoflow to the fields of the price per hour and the number of hours. Then, add the following actions in the nanoflow:
You could also consider hiding the total price field until both fields are filled so that users are not confused by the price showing 0.