here you go
(function ($) {
$(document).ready(function() {
$('.mphb_checkout-guests-chooser').change(function(){
let booking_number = $(this).attr('id').split('-')[1];
let selector = 'select[id^=mphb_room_details-' + booking_number + '-service]';
$(selector).val($(this).find("option:selected").attr('value')).trigger("change");
});
});
})(jQuery);
tell me if that fix your issue