What is the solution to this math problem?
Solve 582*x = 1564*x - 38298 for x.
39