A rectangular garden has its length given by the rational function \[L(x) = \frac{3x + 9}{x - 2},\] where \(x\) is a certain variable. The width of the garden is 5 meters. If the perimeter of the garden is 40 meters, find the value of \(x\). Let's think step by step and output the final answer within \boxed{}.
user