Let \(V\)  and \(E\)  denote sets of representatives of \(F\) -orbits of vertices and edges for the action of \(F\)  on the tree. We consider the relevant part of the \(E^1\) -page for the \(F\) -equivariant spectral-sequence (see Chapter VII.9 of [1]}) applied to the tree:
\(\begin{tikzcd}{} & & & \\1 & \bigoplus _{v\in V}H_1^F(F\times _{F_v}EF_v;\mathcal {U}F) & 0 & \\0 & \bigoplus _{v\in V}H_0^F(F\times _{F_v}EF_v;\mathcal {U}F)) & [l, "d^1"]\bigoplus _{e\in E}H_0^F(F\times _{F_e}F_e;\mathcal {U}F)) & \\{} [uuu, shift right=8] [rrr, shift left=8] & 0 & 1 & {}\end{tikzcd}\) 
If \(F\)  is finite then \(b_1^{(2)}(F)=0\) , so \(d^1\)  is injective and \(E^2_{1,0}=0\) . The result follows from the fact \(E^1_{0,1}=0\) .
Now, assume \(F\)  is infinite, then \(d^1\)  is surjective since \( b^{(2)}_0(F)=0\) . Thus,
\(\dim _{\mathcal {U}F}(\mathrm {Ker}(d^1))=\sum _{e\in E} b^{(2)}_0(F_e)-\sum _{v\in V} b^{(2)}_0(F_v).\) 
Now, the spectral sequence obviously collapses on the \(E^2\) -page and \(E^1_{0,1}=E^2_{0,1}\) . Since von Neumann dimension is additive over short exact sequences, we have
\(b^{(2)}_1(F)&=\dim _{\mathcal {U}F}(\mathrm {Ker}(d^1))+\dim _{\mathcal {U}F}(E_{0,1}^2)\\&= \left(\sum _{e\in E} b^{(2)}_0(F_e) - \sum _{v\in V} b^{(2)}_0(F_v) \right) + \sum _{v\in V} b^{(2)}_1(F_v),\) 

and the result follows.
