Step 1: Define the variables
Let Ankita’s age be \( a \) and Nikita’s age be \( n \).
Step 2: Use the given conditions
Step 3: Express \( a \) in terms of \( n \)
\[ a = 2n - 4 \]
Step 4: Substitute this into the first equation
\[ (2n - 4) \times n = 240 \]
Step 5: Expand and simplify
\[ 2n^2 - 4n = 240 \] \[ 2n^2 - 4n - 240 = 0 \]
Step 6: Divide by 2
\[ n^2 - 2n - 120 = 0 \]
Step 7: Solve the quadratic equation
Using the quadratic formula: \[ n = \frac{2 \pm \sqrt{2^2 - 4(1)(-120)}}{2(1)} \] \[ = \frac{2 \pm \sqrt{4 + 480}}{2} \] \[ = \frac{2 \pm \sqrt{484}}{2} \]
Step 8: Find the possible values of \( n \)
\[ n = \frac{2 + 22}{2} = \frac{24}{2} = 12 \] \[ n = \frac{2 - 22}{2} = \frac{-20}{2} = -10 \]
Since age cannot be negative, we take \( n = 12 \).
Thus, Nikita’s age is 12.