Step 1: Fringe Separation Formula.
The fringe separation \( \beta \) in a double slit experiment is given by:
\[
\beta = \frac{\lambda D}{d}
\]
where \( \lambda \) is the wavelength of the light, \( D \) is the distance between the slits and the screen, and \( d \) is the separation between the slits. The position of the \( n^{\text{th}} \) bright fringe is given by:
\[
y_n = n \beta
\]
For the first light with wavelength \( \lambda_1 \), the \( n^{\text{th}} \) bright fringe is at position \( y_n \). For the second light with wavelength \( \lambda_2 \), the fringe separation changes, and the \( (n+1)^{\text{th}} \) bright fringe is obtained at the same position \( P \) on the screen. By equating the two equations for \( y_n \), we find:
\[
n \frac{\lambda_1 D}{d} = (n+1) \frac{\lambda_2 D}{d}
\]
Simplifying, we get the value of \( n \) as:
\[
n = \frac{\lambda_2}{\lambda_1 - \lambda_2}
\]
Step 2: Final Answer.
Thus, the value of \( n \) is \( \frac{\lambda_2}{\lambda_1 - \lambda_2} \).