The equation x^2 - 8x - 5 = 0 can be transformed into the equation (x - p)^2 = q, where p and q are real numbers. What is the value of q?

Completing the square, we have:

x^2 - 8x - 5 = 0

x^2 - 8x = 5

(x - 4)^2 - 16 = 5

(x - 4)^2 = 21

Comparing with (x - p)^2 = q, we see that p = 4 and q = 21. Therefore, the value of q is 21.