As per our understanding, you want to add/remove require validation from company input fields according to certain types(drop-down change).
Now you can do like this:
add_action( 'wp_footer', 'conditionally_remove_require_fields' );
function conditionally_remove_require_fields(){
// Only on checkout page
if ( is_checkout() && ! is_wc_endpoint_url() ) : ?>
<script>
jQuery(document).on('change','#billing_persontype', function(){
var opt = jQuery(this).val();
var selector = '#billing_company_field';
if(opt == 2){
jQuery(selector).removeAttr('required');
jQuery(selector).removeClass("validate-required");
jQuery(selector + ' label .required').hide();
}else{
jQuery(selector).attr('required',true);
jQuery(selector).addClass("validate-required");
jQuery(selector + ' label .required').show();
}
});
</script>
<?php
endif;
}
You can do modifications according to opt value(1,2) accordingly.