Answer for USA, Canada and countries running a 60 Hz supply service.
The answer to this question, the configuration of your house distribution panel must be stated. The manufacturer's distribution panels were moving to combination panels. These type of panels made it almost impossible to place a transfer switch between the main breaker and the circuit distribution breakers. Older homes with a separate main switch and a load centre were easier to reconfigure. All that was needed for this setup was to remove the wiring between the main switch and the load centre. This is where the transfer switch was installed.
The main thing is not to back feed the main service feeder conductors. With the installation you have now the garage feeders probably are fed from the circuit breaker part of the panel board. This makes it impossible to interlock that breaker with the main breaker.
This is a complicated job for a DIY home owner in as much as you have to know wire sizes, ampacity of wires and proper electrical workmanship. Such a project should be left to a licensed electrical contractor to take out the proper permits and call for proper inspections. By taking this route it will leave you confident that if any mishaps happen to the installation down the road your insurance company will be behind you 100%.
As always, if you are in doubt about what to do, the best advice anyone should give you is to call a licensed electrician to advise what work is needed.
Before you do any work yourself,
on electrical circuits, equipment or appliances
always use a test meter to ensure the circuit is, in fact, de-energized.
IF YOU ARE NOT ALREADY SURE YOU CAN DO THIS JOB
SAFELY AND COMPETENTLY
REFER THIS WORK TO QUALIFIED PROFESSIONALS.