As Xi'an correctly points out, this is a maximisation problem over integers, not real numbers. The objective function is quasi-concave, so we can obtain the maximising value by finding the point at which the (forward) likelihood ratio first drops below one. His answer shows you how to do this, and I have nothing to add to that excellent explanation. However, it is worth noting that discrete optimisation problems like this can also be solved by solving the corresponding optimisation problem in the reals, and then considering the discrete argument points around the real optima.
Alternative optimisation method: In this particular problem it is also possible to obtain the answer via consideration of the corresponding maximisation problem over the reals. To do this, suppose we generalise the binomial likelihood function to allow non-integer values of $n$, while preserving its quasi-concavity:
$$L_x(n) = \frac{\Gamma(n+1)}{\Gamma(n-x+1)} (1-p)^{n-x}
\quad \quad \quad
\text{for all real } n \geqslant x.$$
This objective function is a generalisation of the binomial likelihood function ---i.e., in the special case where $n \in \mathbb{N}$ it simplifies to the binomial likelihood function you are considering. The log-likelihood function is:
$$\ell_x(n) = \ln \Gamma (n+1) - \ln \Gamma (n-x+1) + (n-x) \ln (1-p).$$
The derivatives with respect to $n$ are:
$$\begin{equation} \begin{aligned}
\frac{d \ell_x}{dn}(n)
&= \psi (n+1) - \psi (n-x+1) + \ln (1-p) \\[10pt]
&= \sum_{i=1}^x \frac{1}{n-x+i} + \ln (1-p), \\[10pt]
\frac{d^2 \ell_x}{d n^2}(n)
&= - \sum_{i=1}^x \frac{1}{(n-x+i)^2} < 0. \\[10pt]
\end{aligned} \end{equation}$$
(The first derivative here uses the digamma function.) We can see from this result that the log-likelihood is a strictly concave function, which means the likelihood is strictly quasi-concave. The MLE for $n$ occurs at the unique critical point of the function, which gives an implicit function for the real MLE $\hat{n}$. It is possible to establish that $x/p-1 \leqslant \hat{n} \leqslant x/p$ (see below). This narrows down the discrete MLE to be the unique point in this interval if $x/p \notin \mathbb{N}$, or one of the two boundary points if $x/p \in \mathbb{N}$. This gives an alternative derivation of the maximising value in the discrete case.
Establishing the inequalities: We have already established that the score function (first derivative of the log-likelihood) is a decreasing function. The critical point occurs at the unique point where this function crosses the zero line. To establish the inequalities, it is therefore sufficient to show that the score is non-positive at the argument value $n = x/n-1$ and non-negative at the argument value $n = x/p$.
The first of these two inequalities is established as follows:
$$\begin{equation} \begin{aligned}
\frac{d \ell_x}{dn}(x/p-1)
&= \sum_{i=1}^x \frac{1}{x/p-1-x+i} + \ln (1-p) \\[10pt]
&= \sum_{i=1}^x \frac{p}{x(1-p)+(i-1)p} + \ln (1-p) \\[10pt]
&= \sum_{i=0}^{x-1} \frac{p}{x(1-p)+ip} + \ln (1-p) \\[10pt]
&\geqslant \int \limits_0^x \frac{p}{x(1-p)+ip} \ di + \ln (1-p) \\[10pt]
&= \Bigg[ \ln(x(1-p)+ip) \Bigg]_{i=0}^{i=x} + \ln (1-p) \\[10pt]
&= \ln(x) - \ln(x(1-p)) + \ln (1-p) \\[10pt]
&= \ln(x) - \ln(x) - \ln(1-p) + \ln (1-p) = 0. \\[10pt]
\end{aligned} \end{equation}$$
The second inequality is established as follows:
$$\begin{equation} \begin{aligned}
\frac{d \ell_x}{dn}(x/p)
&= \sum_{i=1}^x \frac{1}{x/p -x+i} + \ln (1-p) \\[10pt]
&= \sum_{i=1}^x \frac{p}{x(1-p)+ip} + \ln (1-p) \\[10pt]
&\leqslant \int \limits_0^x \frac{p}{x(1-p)+ip} \ di + \ln (1-p) \\[10pt]
&= \Bigg[ \ln(x(1-p)+ip) \Bigg]_{i=0}^{i=x} + \ln (1-p) \\[10pt]
&= \ln(x) - \ln(x(1-p)) + \ln (1-p) \\[10pt]
&= \ln(x) - \ln(x) - \ln(1-p) + \ln (1-p) = 0. \\[10pt]
\end{aligned} \end{equation}$$