Saving return value from the_author_posts_link()

The author posts link returns the author name which is linked to posts written by him. I think what you need is the author name of the post.

It can be retrieved with <?php echo get_the_author(); ?> and if in case you need the link to the posts by this author then use:

<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>.

Please correct me if I am wrong!