As it is shown in the post Subgroups of $E_8$ by using extended Dynkin diagrams it is possible to find subgroups of a group from the extended Dynkin diagram by simply cutting nodes.
However, the relation $G_2 \subset SO(7)$ obviously cannot be obtained, since the Dynkin diagram of the $SO(7)$ doesn't contain a triple edge.
Is there an additional rule besides cutting nodes that allows the derivation of the relation on the level of extended Dynkin diagrams?
As mentioned in comments, one has to think not of sub-root systems, but rather of "quotients" of root systems here. As also mentioned in a comment, there is some activity on this topic under the name of "folding" in recent years, but I think it is not explored in the generality that it could be. Cf. https://math.stackexchange.com/a/3972084/96384, https://math.stackexchange.com/a/3300945/96384 and links from there.
In fact, as Callum suggests: Choose a set of simple roots $\gamma_1, \gamma_2, \gamma_3$ for $B_3$, where $\gamma_3$ is the short root. Now "mod out" the relation $\gamma_1=\gamma_3$, i.e. project the ambient, three-dimensional space down to the plane orthogonal to $\gamma_1-\gamma_3$.
If we call $\alpha$ the image of $\gamma_1$ (and $\gamma_3$) under this projection, and $\beta$ the image of $\gamma_2$, one easily checks that all positive roots of $B_3$ get projected to $\alpha$, $\beta$, $\alpha+\beta$, $2\alpha+\beta$, $3\alpha+\beta$, $3\alpha+2\beta$, i.e. the projection/quotient/folding is a root system of type $G_2$ with $\alpha$ (short) and $\beta$ (long) forming a set of simple roots. (If one chooses Cartesian coordinates for better visualization, say $\gamma_1 = (0,-1,1), \gamma_2= (-1,1,0), \gamma_3 = (1,0,0)$, then we project down to the plane $z=x+y$ (which already contains $\gamma_2$ but is perpendicular to $(1,1,-1) = \gamma_3-\gamma_1$.)
To bring things back up to the Lie algebra or group level, cf. the near-duplicate Understanding $G_2$ inside Spin(7)? (EDIT: problem solved).
What makes this specific "folding" a bit strange compared to the standard first examples is that it is not induced by any kind of automorphism of the roots; in fact, we identified the long root $\gamma_1$ with the short root $\gamma_3$! Maybe it becomes more plausible if one sees $B_3$ already as a folding of $D_4$ (as mentioned in Travis Willse's comment). This $D_4$, its Dynkin diagram being "three branches from a central node" seems to play the role of kind of a "simply laced covering" for both $B_3$ and $G_2$: For $D_4 \twoheadrightarrow B_3$, one identifies two of the outer nodes of $D_4$ (and similarly one always gets $D_{n+1} \twoheadrightarrow B_n$); whereas for $D_4 \twoheadrightarrow G_2$, one identifies all three of the outer nodes of $D_4$. What we are doing here is factoring the second folding through the first: which explains why we had to identify that remaining one-edged branch of the diagram with the two-edged one on the other side, the central node $\gamma_2$ has to stay long, whatever it takes.