Here's is another elementary approach based on combinatorial enumeration.
Restriction: This is only a partial answer valid for $1\leq n\leq 183$. A complete answer is planned to follow.
We assume the year having $365$ days. We assume a situation with $x \geq 2$ people and ask for a birthday of them within an interval of length $1\leq n\leq 183$ days.
A starter: $n=2,x=3$
To motivate the approach I would like to give a small example, namely asking for the probability $P(n=2,x=3)$ of three people having their birthday within two consecutive days.
First we determine the number $T$ of all possible configurations.
\begin{align*}
T=365^x=365^3\tag{1}
\end{align*}
Note: Please note, that if we agree that $(1)$ is correct, we observe that e.g. the tripel $(1,365,1)$ means, that the first person's birthday and the third person's birthday is the first day in the year. The second persons birthday is the last day in the year and the configurations $(1,365,1)$ and $(1,1,365)$ are different.
Now, we derive the number $X$ of proper configurations by simply enumerating them.
There are $X_1=365$ proper configurations of three people with birthday on exactly one day
\begin{array}{lllr}
(1,1,1)&\quad\dots\quad&(364,364,364),&(365,365,365)\tag{2}\\
\end{array}
and there are $X_2=6\cdot365$ proper configurations of three people having their birthday on exactly two consecutive days
\begin{array}{lllr}
(1,1,2)&\quad\dots\quad&(364,364,365),&(365,365,1)\tag{3}\\
(1,2,1)&\quad\dots\quad&(364,365,364),&(365,1,365)\\
(2,1,1)&\quad\dots\quad&(365,364,364),&(1,365,365)\\
(1,2,2)&\quad\dots\quad&(364,365,365),&(365,1,1)\\
(2,1,2)&\quad\dots\quad&(365,364,365),&(1,365,1)\\
(2,2,1)&\quad\dots\quad&(365,365,364),&(1,1,365)\\
\end{array}
This gives a total of $X=X_1+X_2=7\cdot365$ proper configurations.
We conclude:
\begin{align*}
P(2,3)=\frac{X}{T}=\frac{7}{365^2}\simeq5.3\cdot10^{-5}
\end{align*}
Now we generalise this approach.
Generalisation: $P(n,x)$ for $x\geq 2$ and $1\leq n\leq 183$
First step: $n=1$
We start the easy way with $n=1$. If there are $x$ people and we ask for having their birthay within exactly one day, there are $365$ proper configurations corresponding to $(1)$, namely the $x$-tuples
\begin{array}{lllr}
\underbrace{(1,1,\dots,1)}_{x}&\quad\dots\quad&\underbrace{(364,364,\dots,364)}_{x},&\underbrace{(365,365,\dots,365)}_{x}\\
\end{array}
So we get for
$n=1$:
\begin{align*}
X_1=365
\end{align*}
Second step: $2\leq n\leq 183$
Let's assume an interval of length $k$ with $2\leq k \leq n$ and let's ask for the number of proper configurations of people having their birthday within an interval of length exactly $k$.
So, we have to determine the number $Y_k$ of $x$-tuples which have values only within the interval and which also contain at least one left endpoint and at least one right endpoint of the interval. This number is
\begin{align*}
Y_k=k^x-2(k-1)^x+(k-2)^x\qquad(x \geq 2)
\end{align*}
Observe that $k^x$ gives the number of all $x$-tuples with (the $k$ different) values from the interval. We subtract $2(k-1)^x$ which is the number of $x$-tuples having no left endpoint or having no right endpoint of the interval. Since we subtracted the number of $x$-tuples, which have neither left nor right endpoint twice, we have to add $(k-2)^x$ for compensation according to the Inclusion-Exclusion Principle.
There are $365$ different intervals of length $k$, namely:
\begin{align*}
&[1,2,\dots,k]\\
&[2,3,\dots,k+1]\\
&\quad\dots\\
&[364,365]\cup[1,2,\dots,k-3,k-2]\\
&[365]\cup[1,2,\dots,k-2,k-1]\\
\end{align*}
And since we can vary $k$ between $2$ and $n$, we observe that $X_2$, the number of proper configurations of $x\geq 2$ people having their birthdays within $n$ days is after some simplifications for
$2 \leq n\leq 183$:
\begin{align*}
X_2&=365\sum_{k=2}^{n}Y_k\\
&=365\sum_{k=2}^{n}\left(k^x-2(k-1)^x+(k-2)^x\right)\\
&=365\left(n^x-(n-1)^{x}-1\right)
\end{align*}
This gives a total of $X=X_1+X_2=365\left(n^x-(n-1)^x\right)$
We conclude:
\begin{align*}
P(n,x)=\frac{X}{T}=\frac{n^x-(n-1)^x}{365^{x-1}}\qquad(1\leq n \leq 183), \quad (x\geq2)
\end{align*}
in accordance with the answer of mjqxxxx if we additionally respect $n\leq 183$.
Note: Observe, that if we ask for the probability of two people having their birthday within $183$ days, the result should give $1$. Indeed we get
\begin{align*}
P(n,x)=P(183,2)=\frac{183^2-182^2}{365}=\frac{365}{365}=1
\end{align*}
Note: Observe, that due to some circular overlappings of intervals in case of $184 \leq n \leq 365$ some proper configurations are repeatedly counted, so that for some values of $x$
\begin{align*}
P(n,x) \geq 1\qquad (184 \leq n \leq 365)
\end{align*}
To correct the formula of $P(n,x)$ in this case should be the next activitiy :-)