how to retrieve the image title for image Post Format

So first off, I hope you’re aware that the quote there is a guideline on how should a post of the image format be displayed to the user, and the thing about the title attribute applies only to posts where the format is image and that the post content is the image URL only, e.g. https://example.com/image.jpg.

what title attribute they are talking about

It’s the title attribute of the <img> tag, and the attribute value should be set to the post title.

how to retrieve that title through PHP

There are some functions you can choose from such as get_post_field(), get_the_title() and the_title_attribute().

So for example, your <img> can be generated like so:

<img src="<?php echo esc_url( get_post_field( 'post_content' ) ); ?>"
    title="<?php the_title_attribute(); ?>">