Ответ:

John had been trying to fix his computer for two hours before he decided to call a professional.