An auto mechanic charges $50 to diagnose a problem and $25 per hour to repair the problem. If x represents the total number of hours worked and y represents the total charges, which equation represents this situation?
A. y = 25x + 50
B. y = 50x + 25
C. y = 50x - 25
D. y = 25x - 50