Let $G_1$ and $G_2$ be two homeomorphic graphs. Let $G_1$ have $n_1$ vertices and $m_1$ edges, and let $G_2$ have $n_2$ vertices and $m_2$ edges. Show that $m_1 − n_1 = m_2 − n_2$.
Here is my proof
By the degree formula, $\sum deg(v)=2E$
Let's say graph $G_1$ has degree $2E$ and edge $E$, since $G_1$ and $G_2$ are homeomorphic. Add $k$ vertices to $G_1$ to make it become $G_2$. The sum of degree of $G_2$ is $2E+2k$, and number of edges of $G_2$ is $E+k$
How do I proceed from here to prove that $m_1 − n_1 = m_2 − n_2$?
$\textbf{Update}$
prove that homeomorphic graphs with no vertices of degree two are isomorphic.
By definition, two graphs are homeomorphic if they are isomorphic or can be reduced to isomorphic graphs by a sequence of series reductions(remove vertex of degree 2). Equivalently, two graphs are homeomorphic if they can be obtained from the same graph by a sequence of elementary subdivisions(insert vertex in the middle of an edge).
Can I just conclude that "homeomorphic graphs with no vertices of degree two are isomorphic" from the definition?