Area of a rectangle = Length x Breadth.

40 = Length x 5, so Length = 40 / 5 = 8 cm.

Final Answer: 8