Concept:
When an article is sold at a loss,
\[
\boxed{\text{Selling Price}=\text{Cost Price}\times\frac{100-\text{Loss}\%}{100}}
\]
Step 1: Form the equation.
Given,
\[
\text{Selling Price}=6400,
\]
and loss
\[
=20\%.
\]
Hence,
\[
6400=\text{CP}\times\frac{80}{100}.
\]
Step 2: Find the cost price.
\[
\text{CP}
=6400\times\frac{100}{80}
=6400\times\frac54
=8000.
\]
Step 3: Verification.
Loss
\[
=20\%\text{ of }8000
=1600.
\]
Selling price
\[
=8000-1600=6400,
\]
which agrees with the given data.
Step 4: Final conclusion.
Therefore, the cost price of the bed is
\[
\boxed{\text{Rs. }8000.}
\]