I don’t understand why your are asking. Is the code not working? Since you are getting a value from a specific post (i.e. get_option('page_for_posts')) your code should work wherever you place it in your templates.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users