Solve this math problem

Solve 292*w + 54190 - 10064 = 1471*w - 1855 for w.
39