How to get user_id from wordpress database inside ajax function?

EDIT:
You need to get the variable from AJAX in you case you need to do:

function profile_view() {
$user_id = $_GET["user_id"]; // name of hidden input

$args = array(
        'post_type' => 'listings',
        'post_status'    => 'publish',
        'meta_query' => array(
            array(
                'key' => 'stm_car_user',
                'value' => $user_id
            )
        )
    );
...