A rectangular garden's length is 5 feet longer than its width. If its perimeter can be represented using the function P(x) = 4x + 10, what is the width of the garden if its perimeter is 38 feet?