The task is to check whether the two graphs are isomorphic:
The solutions is given as:
The instructions say we can rearrange the vertices and rename them. However looking at the solution I could also rearrange the vertices V5 and V2 in as such that their position switches. (Both are connected to V1 and V3). How can I tell which solution is correct?


They are both correct. In general, we say that two objects, graphs in this case, are isomorphic if there exists an isomorphism between them. In this context that means that there is a way to relabel/rearrange the vertices to transform one graph into another. However, that does not preclude the possibility that there is more than one isomorphism, or in your case that there is more than one way to rearrange and relabel the vertices to make the two graphs the same. So both solutions are correct.
A nice example of this in the graph theoretic context is given by the $C_n$, the cycle graph on $n$ vertices. Obviously $C_n \cong C_n$, but there are actually $n$ possible isomorphism, corresponding to the $n$ relabeling of the vertices that leave the vertices in the same order.