At the resource level, you can configure either a fixed duration or fixed time slots.
However, it is not possible to change the duration based on the selected price options or fields.
Initially, the customer selects the start and end times. Only after that do they choose price options and additional fields.
You can, however, validate the selected duration. If the customer selects an invalid combination of duration, price options, or fields, a validation error will be displayed in the widget.
To do this, create a reaction of type Error. Then add the condition that the duration must not exceed 2 hours and that Price option B is selected.
The configuration will look like this:
You can try booking different durations for different price options: