How do I add conditional shipping cost to an order?
Here the idea,


Using hook_checkout_pane() include your option Residential Delivery Fee as checkbox 
Then while saving order check if user selected this option. Use hook_order 
If user chose this option, you can add your shipping charge as line item with the function uc_order_line_item_add().


foreg: 

function hook_order(){
switch ($op) {
.....................
case 'save':
if($arg1-&gt;residential){
//if the checkbox was selected, we add the line item to the order. the following function  will add 100 to order total as shipping charge
uc_order_line_item_add
    (
      $arg1-&gt;order_id, 
      'shipping',
      t('Residential Delivery Fee'), 
      100, 
      NULL,
      array () 
    );

 }
}