Explanation:
To solve this problem, we need to determine the original cost price of the article.
Let the original cost price of the article be $C$ Rs.
Given that when the article is sold at Rs. 40, the shopkeeper makes a profit of $X\%$.
The selling price with a profit of $X\%$ is:
$$
\text{SP}_1 = C + \frac{X}{100} \times C = C \left(1 + \frac{X}{100}\right)
$$
Since $\text{SP}_1 = 40$,
$$
C \left(1 + \frac{X}{100}\right) = 40
$$
Similarly, when the article is sold at Rs. 20, the shopkeeper makes a loss of $X\%$.
The selling price with a loss of $X\%$ is:
$$
\text{SP}_2 = C – \frac{X}{100} \times C = C \left(1 – \frac{X}{100}\right)
$$
Since $\text{SP}_2 = 20$,
$$
C \left(1 – \frac{X}{100}\right) = 20
$$
Now, we have two equations:
$$
C \left(1 + \frac{X}{100}\right) = 40
$$
$$
C \left(1 – \frac{X}{100}\right) = 20
$$
Divide the first equation by the second to eliminate $C$ and solve for $X$:
$$
\frac{C \left(1 + \frac{X}{100}\right)}{C \left(1 – \frac{X}{100}\right)} = \frac{40}{20}
$$
$$
\frac{1 + \frac{X}{100}}{1 – \frac{X}{100}} = 2
$$
Cross-multiply and simplify:
$$
1 + \frac{X}{100} = 2 \left(1 – \frac{X}{100}\right)
$$
$$
1 + \frac{X}{100} = 2 – \frac{2X}{100}
$$
$$
1 + \frac{X}{100} + \frac{2X}{100} = 2
$$
$$
1 + \frac{3X}{100} = 2
$$
$$
\frac{3X}{100} = 1
$$
$$
X = \frac{100}{3}
$$
Substitute $X = \frac{100}{3}$ into the equation $C \left(1 + \frac{X}{100}\right) = 40$:
$$
C \left(1 + \frac{100/3}{100}\right) = 40
$$
$$
C \left(1 + \frac{1}{3}\right) = 40
$$
$$
C \times \frac{4}{3} = 40
$$
$$
C = 40 \times \frac{3}{4}
$$
$$
C = 30
$$
Therefore, the original cost of the article is Rs. 30. The correct answer is (c) Rs. 30.