Let the number of marbles with A and B be x and y respectively.
The ratio of the number of marbles with them = \(\frac{ x }{ y}\)
It is also known that x + y = N
If A gives 12 marbles to B, the respective numbers of marbles with A and B are x – 12 and y + 12.
It is known that \(\frac{(x – 12) }{ (y + 12)}\) = \(\frac{y }{ x}\)
Simplifying the above equation, we get,
\(x^2\) – \(y^2\) = 12 (x + y)
Using standard algebraic identities, the equation above can be rewritten as,
(x – y) (x + y) = 12 (x + y)
From the equation above, x – y = 12 or x = y + 12
Since x + y = N, the value of x can be substituted in this equation. Upon doing so, we have,
y + 12 + y = N
2y + 12 = N
Solving for y, we have y = \(\frac{(N – 12)}{ 2}\)
Therefore, x = y + 12 = \(\frac{(N – 12)}{2}\) + 12 = \(\frac{(N + 12)}{2}\)
Let the number of marbles that A has to give B be k.
Then, x – k = y + k
\(\frac{(N + 12)}{2}\) – k = \(\frac{(N – 12)}{2}\) + k
Solving for k, we have,
N + 12 – 2k = N - 12 + 2k
4k = 24
k = 6
A should give 6 marbles to B so that each of them has an equal number of marbles
The correct answer option is A