How to display title of attached image in post?

First you need to get your attached image ID, how you get it depends on how you’re setting the image. The generic idea is that you get the attachment ID then you can simply use get_the_title( $attachment_id ).

If you’re setting it as a Featured Image ( Post Thumbnail ) then you can use the following function to get the image ID: get_post_thumbnail_id( $post_id ).