How to hyperlink both post thumnail image and post title text in wordpress?

You had the right idea when you put the thumbnail between the opening and closing <a> tags, but the dot operators and the quotes are wrong, which is why it breaks down the site.

This would be the proper way to write it:

$string .= '<li>' .'<a class="nana" href="'. get_permalink() .'" >'. get_the_post_thumbnail() . get_the_title() .'</a><hr/></li>';