Step 1: Understanding the Question:
For continuity at \(0\) we need \(\lim_{x\to0}f(x) = f(0) = 2\).
Step 2: Evaluate the limit:
\(8^x - 2^x = 2^x(4^x - 1)\). So \(f(x) = 2^x\cdot\dfrac{4^x-1}{k^x-1}\).
Divide top and bottom by \(x\): \(\dfrac{(4^x-1)/x}{(k^x-1)/x}\to\dfrac{\ln4}{\ln k}\), and \(2^x\to1\).
\[ \lim_{x\to0}f(x) = \frac{\ln 4}{\ln k} \]
Step 3: Solve for k:
\(\frac{\ln4}{\ln k} = 2\), so \(\ln k = \frac{\ln 4}{2} = \ln 2\), and \(k = 2\).
\(k = 0\) is undefined for the logarithm, \(k=-2\) makes \(k^x\) undefined for general \(x\), and \(k = 4\) would give a limit of \(1\).
Final Answer:
The value of \(k\) is \(2\), option (D).
\[ \boxed{2} \]