Machine A and Machine B work in the same factory. Machine A can produce 45 widgets in one hour and Machine B can produce 40 widgets in one hour. During one week, Machine B worked five more hours than Machine A but produced the same number of widgets as Machine A. How many hours did Machine A work that week?