Write
x=2a, y=2b, z=2c. Then
logx(2y)=ab+1, log2x(4z)=a+1c+2, and
log2x4(8yz)=4a+1b+c+3, so the condition is
a2(b+1)=a+12(c+2)=4a+1b+c+3=0.
From the first two,
ab+1=a+1c+2, and equal ratios also equal their mediant
2a+1b+c+3. Comparing with the third expression gives
2a+12(b+c+3)=4a+1b+c+3. The common value is nonzero, so
b+c+3=0, and thus
2(4a+1)=2a+1, giving
a=−61. Then
−61b+1=65c+2 yields
c+2=−5(b+1), that is,
5b+c=−7.
Therefore
xy5z=2a+5b+c=2−61−7=26431, so
p+q=43+6=49.