Japt, 9 bytes
_q}a@nVpX
Explanation
_ q}a@ nVpX
Z{Zq}aX{UnVpX} // Ungolfed
// Implicit: U, V = input integers
aX{ } // For each integer X in [0...1e9), take
VpX // V to the power of X
Un // minus U,
Z{ } // and return the first one Z where
Zq // Math.sqrt(Z) is truthy.
// Math.sqrt returns NaN for negative inputs, and 0 is falsy, so this is
// truthy iff Z is positive. Therefore, this returns the first positive
// value of V**X - U.
// Implicit: output result of last expression