Let the common difference of the AP be d.
First term, a = 5
Now,
a1 + a2 + a3 + a4 = \(\frac{1}{2}\)(a5 + a6 + a7 + a8) (Given)
\(\Rightarrow\) 8a + 12d = 4a + 22d
\(\Rightarrow\) 22d - 12d = 8a - 4a
\(\Rightarrow\) 10d = 4a
\(\Rightarrow\) \(d=\frac{2}{5}a\)
\(\Rightarrow\) \(d=\frac{2}{5}\times5=0\) (a = 5)
Hence, the common difference of the AP is 2.