How does subrogation arises?

Can you answer this question?