Case A. There is no need to determine it inside the main template file (index.php) because it is the default template for it.
Case B. To determine it inside a page template (ex: page.php), simply check it like so:
get_option( 'page_for_posts' ) == get_the_ID()
I literally went digging the source-code of it just to be able to know how wordpress does the checking of the value. It turns out, it is using the statement
get_option( 'page_for_posts' ) to know the post ID of the selected value of the Posts page.
So yeah, for this purpose, there is no such official checker function that is similar to
As long as you know the ID of the page that you've selected then you can use it for the checking process.
WordPress Codex, Theme Development, codex.wordpress.org/Theme_Development
Source-code of Settings › Reading Settings, github.com/WordPress/.../wp-admin/options-reading.php