Let the principal amount be \( P \) and the annual interest rate be \( r \). The formula for compound interest is:
\[
A = P(1 + r)^t
\]
where:
- \( A \) is the amount after \( t \) years,
- \( P \) is the principal,
- \( r \) is the rate of interest,
- \( t \) is the number of years.
In 2007, the accumulated interest is Rs. 10,000. The amount at the beginning of 2007 is:
\[
A_1 = P + 10000
\]
Using the formula for compound interest from 2004 to 2007 (3 years), we have:
\[
P(1 + r)^3 = P + 10000 \quad \text{(Equation 1)}
\]
In 2010, the accumulated interest is Rs. 25,000. The amount at the beginning of 2010 is:
\[
A_2 = P + 25000
\]
Using the compound interest formula from 2004 to 2010 (6 years), we have:
\[
P(1 + r)^6 = P + 25000 \quad \text{(Equation 2)}
\]
Now, divide Equation 2 by Equation 1:
\[
\frac{P(1 + r)^6}{P(1 + r)^3} = \frac{P + 25000}{P + 10000}
\]
This simplifies to:
\[
(1 + r)^3 = \frac{P + 25000}{P + 10000}
\]
Substitute the values from the question:
\[
(1 + r)^3 = \frac{25000 + P}{10000 + P}
\]
Solve this equation to find \( P = 20000 \).
\[
\boxed{P = 20000}
\]