A company has a function defined by \( f(x) = 3x + 7 \) to calculate the profit (in thousands of dollars) based on the number of products \( x \) sold. Another function \( g(x) = 2x - 5 \) calculates the cost (in thousands of dollars) of producing \( x \) products. If the company wants to achieve a profit that is twice its cost, how many products \( x \) must be sold? Let's think step by step and output the final answer within \boxed{}.
user