Proof that every finite tree with at least 2 vertices have at least two vertices of degree 1 The proof in my lecture notes starts as such:
Let $T$ be a finite tree on at least $2$ vertices. Consider a path $P = xe_1x_1e_2...y$ of maximum length in $T$. This path begins with a vertex $x$, and ends with a different vertex $y$. Assume that one of $x,y$ (w.l.o.g. $x$) has degree at least $2$. Thus $x$ has a neighbour $w$ different from $x_1$. If $w$ is not contained in $P$, then the path going from $w$ to $x$ and then via $P$ to $y$ is strictly longer than $P$, contradicting the maximality of $P$. Hence, $w$ is in $P$.
So far so good. Now comes the part I don't understand:
but then $T$ contains a cycle: Starting at $x$, follow along $P$ until $w$, then go back to $x$ via the edge $\{x,w\}$.
I don't understand how this can be a cycle. When you "start at $x$, follow along $P$ until $w$", don't you walk along the edge $\{x,w\}$? .
 A: You have drawn the picture incorrectly. The vertex $w$ lies on the path $P$ and does not coincide with $x_1$, so moving along $P$ until you meet $w$ you will not traverse the edge $xw$.
This really means that your graph contains a cycle.
Here is the correct picture (in red the path $P$ is shown):

A: It might be easier to think of things this way. Start at $w$ and follow the edge from $w$ to $x$. Now walk down path $P$ toward $y$. Since $w$ is contained in path $P$, as we walk down $P$ we’ll eventually bump into $w$. Overall this means that we started at $w$, walked down a series of nodes, and ended back up at $w$ without repeating any other nodes. That’s a cycle, which is where the contradiction comes from.
The proof uses a similar argument but instead starts at $x$ and walks towards $y$ down $P$. At some point on the path you will encounter $w$ (because $w$ appears somewhere on $P$), at which point we follow the edge from $w$ back to $x$ and close the loop. This is the same cycle as above, just expressed differently.
