The length of the smaller rectangle is 8 inches and the width is x inches. The length of the larger rectangle is 10 inches and the width is 5 inches. What is the width of the smaller rectangle?