Compare both pairs
[tex]\\ \rm{:}\dashrightarrow 8q-2=6[/tex]
[tex]\\ \rm{:}\dashrightarrow 8q=6+2[/tex]
[tex]\\ \rm{:}\dashrightarrow 8q=8[/tex]
[tex]\\ \rm{:}\dashrightarrow q=\dfrac{8}{8}[/tex]
[tex]\\ \rm{:}\dashrightarrow q=1[/tex]
And
[tex]\\ \rm{:}\dashrightarrow 2-7p=p+6[/tex]
[tex]\\ \rm{:}\dashrightarrow 2-6=8p[/tex]
[tex]\\ \rm{:}\dashrightarrow p=-1/2[/tex]