Have h2 tag not show up if there are no blog posts

Put your <h2> tag after the call to get_related_author_posts(). For example…

$rap = get_related_author_posts();

if (!empty($rap)) {
  echo '<h2>Recent Blog Articles</a></h2>'; // <- broken anchor tag !!!
  echo $rap;
  // and so on
}

But you will need to make get_related_author_posts() return false if there are no posts.

function get_related_author_posts() {
    global $authordata, $post;

    $authors_posts = get_posts( array( 'author' => $authordata->ID, 'post__not_in' => array( $post->ID ), 'posts_per_page' => 5 ) );
    if (empty($author_posts)) return false;
    // and the rest of the function