If the system of equations

$$
\begin{aligned}
& p x+q y=8 \\
& 3 x-q y=38
\end{aligned}
$$

has the solution $(x, y)=(2,-4)$, then $p$ is equal to
(A) -12
(B) 20
(C) 8
(D) 40
(E) 21.5
Solution 1

Adding the two given equations, we get $p x+3 x=46$ or $(p+3) x=46$.

Since $(x, y)=(2,-4)$ is a solution to both equations, then $x=2$ satisfies the equation $(p+3) x=46$.

Thus, $2(p+3)=46$ or $p+3=23$ or $p=20$.

## Solution 2

Substituting $(x, y)=(2,-4)$ into the second equation, we obtain $3(2)-q(-4)=38$ or $6+4 q=38$ or $q=8$.

The first equation thus becomes $p x+8 y=8$.

Substituting $(x, y)=(2,-4)$ into this new first equation, we obtain $p(2)+8(-4)=8$ or $2 p-32=8$ or $p=20$.

ANSWER: (B)