passing variables inside a widget add_action

Use the use keyword:

$title = $instance['title'];

add_action( 'wp_footer', function() use ( $title ) {
    echo  $title; 
});

techhipbettruvabetnorabahisbahis forumuedueduseduedueduseduedueduseduedus