A rectangle has a length of 10 inches and a width of 5 inches. If the length is increased by x inches and the width decreased by twice that amount, express the area of the rectangle as a function of x.