You can specify a fixed rental duration in the resource settings.
But changing the duration depending on selected price options and fields is not supported.
Initially, the customer selects the start and end time.
And only after that he can choose price options and additional fields.
So let's create a rental with a fixed duration.
Create a resource — Rental.
In the rule of work, specify the working time schedule and necessary rental intervals.
Now open the parameters of the resource.
And on the settings form, set the Fixed duration checkbox and specify the number of days, hours, or minutes.
See the demo for a resource having a fixed duration of 3 hours: