Step 1: Pick easy numbers for $x$ and $y$ to test the relation.
Let $x=100$ and $y=10$, using base $10$ logs so the numbers stay clean. Then $\log x = 2$ and $\log y = 1$.
Step 2: Compute $a$ and $b$ from these values.
$a = \log(x^2y^4) = 2\log x + 4\log y = 2(2) + 4(1) = 4+4=8$
$b = \log\frac{x}{y} = \log x - \log y = 2-1=1$
Step 3: Compute the actual value of $\frac{\log x}{\log y}$ directly.
\[ \frac{\log x}{\log y} = \frac{2}{1} = 2 \]
Step 4: Check each option using $a=8$ and $b=1$.
$\frac{a+4b}{a-2b} = \frac{8+4}{8-2} = \frac{12}{6} = 2$, matches.
$\frac{a-4b}{a+2b} = \frac{8-4}{8+2} = \frac{4}{10} = 0.4$, does not match.
$\frac{a+4b}{a+2b} = \frac{12}{10} = 1.2$, does not match.
$\frac{a-4b}{a-2b} = \frac{4}{6} \approx 0.67$, does not match.
Step 5: Confirm with a second pair of numbers.
Try $x=1000$, $y=10$: $\log x=3$, $\log y=1$, so $\frac{\log x}{\log y}=3$. Also $a=2(3)+4(1)=10$, $b=3-1=2$. Testing option (a): $\frac{10+8}{10-4}=\frac{18}{6}=3$, matches again.
Final Answer:
Both test cases confirm that $\frac{\log x}{\log y}=\frac{a+4b}{a-2b}$, option (a). \[ \boxed{\dfrac{a+4b}{a-2b}} \]