get author_name from queried post

The problem with your code lies in these three lines:

$queried_post = get_post($post_id);         
$author_id = $queried_post->post_author;
$first = $user_info->user_nicename;             

You correctly get authors ID, but then you try to get some field of user_info variable, which is not defined anywhere in your code.

One way to fix it is to get user info (using get_userdata) before trying to access it:

$author_id = $queried_post->post_author;
$user_info = get_userdata( $author_id );
$first = $user_info->user_nicename;  

You can also use get_the_author_meta to obtain only the field you need:

$author_id = $queried_post->post_author; 
$first = get_the_author_meta( 'user_nicename', $author_id );