Concept:
A practical cell is not an ideal source of emf. Every real cell possesses an internal resistance $r$ in series with its emf $E$. When an external resistance $R$ is connected across the cell, the current flowing through the circuit is given by
\[
I=\frac{E}{R+r}.
\]
The power consumed in the external resistor is
\[
P=I^2R.
\]
Substituting the expression for current,
\[
P=\left(\frac{E}{R+r}\right)^2R.
\]
Therefore,
\[
P=\frac{E^2R}{(R+r)^2}.
\]
This expression is extremely important because it relates the load resistance, internal resistance and power delivered by the cell.
In this problem, two different external resistances are connected to the same cell, yet the power consumed remains the same in both cases. Using this condition, we can determine the internal resistance of the cell.
Step 1: Write the power expression for the two resistor configurations.
Let
\[
R_1=2\,\Omega
\]
and
\[
R_2=4.5\,\Omega.
\]
When the resistor $R_1$ is connected, the power consumed is
\[
P_1=\frac{E^2R_1}{(R_1+r)^2}.
\]
Similarly, when the resistor $R_2$ is connected, the power consumed is
\[
P_2=\frac{E^2R_2}{(R_2+r)^2}.
\]
According to the question,
\[
P_1=P_2.
\]
Therefore,
\[
\frac{E^2R_1}{(R_1+r)^2}
=
\frac{E^2R_2}{(R_2+r)^2}.
\]
Step 2: Cancel the common factor and simplify the equation.
Since $E^2$ appears on both sides, it can be cancelled directly.
Thus,
\[
\frac{R_1}{(R_1+r)^2}
=
\frac{R_2}{(R_2+r)^2}.
\]
Cross-multiplying,
\[
R_1(R_2+r)^2
=
R_2(R_1+r)^2.
\]
This equation contains only one unknown quantity, namely the internal resistance $r$.
Step 3: Expand both sides completely.
Expanding the left-hand side,
\[
R_1(R_2+r)^2
=
R_1(R_2^2+2R_2r+r^2).
\]
Therefore,
\[
R_1R_2^2
+
2R_1R_2r
+
R_1r^2.
\]
Similarly, expanding the right-hand side,
\[
R_2(R_1+r)^2
=
R_2(R_1^2+2R_1r+r^2).
\]
Therefore,
\[
R_2R_1^2
+
2R_1R_2r
+
R_2r^2.
\]
Hence,
\[
R_1R_2^2
+
2R_1R_2r
+
R_1r^2
=
R_2R_1^2
+
2R_1R_2r
+
R_2r^2.
\]
Step 4: Cancel common terms and solve for $r$.
The terms
\[
2R_1R_2r
\]
appear on both sides and cancel immediately.
Thus,
\[
R_1R_2^2+R_1r^2
=
R_2R_1^2+R_2r^2.
\]
Rearranging,
\[
R_1r^2-R_2r^2
=
R_2R_1^2-R_1R_2^2.
\]
Taking common factors,
\[
r^2(R_1-R_2)
=
R_1R_2(R_1-R_2).
\]
Since
\[
R_1\neq R_2,
\]
we divide both sides by $(R_1-R_2)$.
Hence,
\[
r^2
=
R_1R_2.
\]
Taking positive square root because resistance cannot be negative,
\[
r
=
\sqrt{R_1R_2}.
\]
This is a very useful standard result.
Step 5: Substitute the numerical values.
Given,
\[
R_1=2\,\Omega,
\]
\[
R_2=4.5\,\Omega.
\]
Therefore,
\[
r
=
\sqrt{2\times4.5}.
\]
\[
r
=
\sqrt{9}.
\]
\[
r=3\,\Omega.
\]
Step 6: Verify the result.
The obtained internal resistance is
\[
r=3\,\Omega.
\]
Substituting into the standard relation,
\[
r^2=R_1R_2
=
2\times4.5
=
9,
\]
which gives
\[
r=3\,\Omega.
\]
Hence the calculation is completely consistent.
Final Answer:
The internal resistance of the cell is
\[
\boxed{3\,\Omega}.
\]
Therefore, the correct option is
\[
\boxed{\text{(C)}\;3\,\Omega}.
\]