1. Calculate the price per meter by dividing the total price by the total meters:
\text{price per meter} = \frac{R\$40}{2 \text{ m}} = R\$20 \text{ per meter}
2. Multiply the price per meter by the desired meters:
\text{total price} = 5 \text{ m} \times R\$20 \text{ per meter} = R\$100
3. The total cost for 5 m of fabric is:
R\$100