This method is useful for adding a garage to houses on hillsides or large foundations.
Lay a driveway and extension piece
Using the raise terrain tool, raise a corner by 12 clicks
Drag the foundation tool from the raised point across the back of the extension piece
And then dragging from the tall foundation, do the sides of the garage
Make sure that the sides stop at the end of the extension piece. Then add a wall across the middle (the wall should fit perfectly, if it doesn't then you haven't raised the ground by exactly 12 clicks)
Add a garage door and floortiles for the top - you can now build your house attached.