+ t(G)$ and $|E(T')| = s(G)$. Since $T'$ is a tree, we obtain $$\label{en1}
b(G) + a(G) + t(G) = s(G) +1.$$ Moreover, since the sum of all the degrees of vertices in $T'$ is equal to $2|E(T')|$ (by the handshaking lemma) one can conclude $$\label{en2}
3b(G) + 2a(G) + t(G) = 2s(G).$$

Finally, the results follow from and .

In the next lemma, formulas for the first Zagreb index are given.

\[firzag1\] For a catacondensed benzenoid graph $G_1$ and a phenylene $G_2$ it holds $M_1(G_1)= 26h(G_1)-2$ and $M_1(G_2)=44h(G_2)-20 $.

The proof for catacondensed benzenoid graph $G_1$ can be found in [@beh; @doslic]. By Proposition \[phen\], $G_2$ has $4h(G_2)-4$ vertices of degree three and $2h(G_2)+4$ vertices of degree two. Therefore, $$M_1(G_2) = 9(4h(G_2)-4) + 4(2h(G_2)+4) = 44h(G_2) - 20$$ and the proof is complete.

In the following proposition we obtain formulas for the second Zagreb index with respect to the number of hexagons, the number of segments, and the number of branched hexagons. Note that for catacondensed benzenoid graphs a similar formula was obtained in [@doslic]. In addition, for benzenoid graphs this index can be expressed also by using inlets (for the details see Proposition 5.5 in [@gut2]).

\[second\_zagreb\] If 