There isn't a formula, per se, since this depends entirely on the prime factorisations of $N$ and $x$, and we don't have a good way to get those.
That being said, if we have the prime factorisations:
$$
N = 2^{N_2}\cdot3^{N_3}\cdot5^{N_5}\cdots\\
x = 2^{x_2}\cdot3^{x_3}\cdot5^{x_5}\cdots
$$
(where most of the exponents $N_p$ and $x_p$ are $0$), then you can divide $N$ by $x$ the following number of times, without getting decimals:
$$
\min\left\{\left\lfloor\left.\frac{N_i}{x_i}\right\rfloor\,\,\right|\,\,x_i\neq 0\right\}
$$
In other words, take all the exponents $x_i$ which aren't $0$, divide the corresponding $N_i$ by those $x_i$, take away the decimal part, so you're only left with integers, then take the smallest of those integers.
For instance, $100 = 2^2\cdot 5^2$ and $2 = 2^1$. So we take all the exponents of the latter (which is $1$), take the corresponding exponents from the former (which is $2$), calculate $\frac21 = 2$, strip away the decimals, and we see that we may divide $100$ by $2$ two times without getting decimals.
For a more involved example, where it's easier to see which part corresponds to what, let's look at dividing $360 = 2^3\cdot 3^2\cdot 5^1$ by $12 = 2^2\cdot 3^1$. The non-zero exponents of $12$ are $2$ and $1$ (with bases $2$ and $3$, repsectively). The corresponding exponents of $360$ are $3$ and $2$, respectively.
So, we calculate $\frac32 = 1.5$ and $\frac21 = 2$, strip away all decimals to get $1$ and $2$, take the smallest one of these (which is $1$), and we see that we can divide $360$ by $12$ once without getting decimals (we get $30$), but not twice (we would get $2.5$).
Responding to the edit: If we know that $x$ is prime, then that makes the above a lot easier: only one of the exponents of $x$ is non-zero (namely $x_x$), and that is equal to $1$, so the answer is actually just $N_x$. However, if we don't have $N_x$, then really, the easiest (and as far as I know only) way to get it is to divide by $x$ repeatedly and check.
Best Answer
For this particular problem:
I recognize $105$ as $3 \times 5 \times 7$.
Then I wonder: Are any of these factors shared by $148$?
No, unfortunately not: We can quickly see the latter is not divisible by $3$ or $5$.
However, its predecessor $147 = 7 \times 21 = 3 \times 7 \times 7$.
So: I might just estimate by replacing the denominator:
$$\frac{105}{148} \approx \frac{105}{147} = \frac{3 \times 5 \times 7}{3 \times 7 \times 7} = \frac{5}{7}$$
If you happen to know that $\frac{1}{7} = 0.\overline{142857}$, then you might recognize $\frac{5}{7}$ as just over $0.71$.
Finally: Since we decreased the denominator, the original ratio is a bit less than our adjusted one. Since our adjusted ratio is just over $0.71$, this seems like a pretty good guess.
(Indeed: $\frac{105}{148} = 0.709459\ldots$)