Step 1: Since \(f(x) = \log x\), replacing \(x\) by \(\log x\) gives \(f(\log x) = \log(\log x)\). Call this \(g(x) = \log(\log x)\).
Step 2: Differentiate once using the chain rule. \[g'(x) = \frac{1}{\log x}\cdot\frac{1}{x} = \frac{1}{x\log x} = (x\log x)^{-1}\]
Step 3: Differentiate again. Write \(g'(x) = (x\log x)^{-1}\) and use the chain rule with \(u = x\log x\). \[g''(x) = -1\cdot(x\log x)^{-2}\cdot\frac{d}{dx}(x\log x)\]
Step 4: Compute the inner derivative using the product rule. \[\frac{d}{dx}(x\log x) = \log x + x\cdot\frac{1}{x} = \log x + 1\]
Step 5: Substitute back. \[g''(x) = -(x\log x)^{-2}(\log x + 1)\] This matches option (B), so the answer is \(\boxed{-(x\log x)^{-2}(\log x+1)}\).