Officials do not know the cause of the fire, which they say started in between the two buildings. But they say it is possible that heat may have exacerbated it.
It all started around 2 p.m. on the 100 block of Rush Creek Court, which is just off of Dougherty Road.
When crews arrived they saw two homes burning, so they started to aggressively attack the blaze. During that time, part of the building collapsed and firefighters were forced to retreat and fight defensively.
"We had two heat exposure-type illnesses along with an issue with somebody getting hit in the head with some sheet rock. Minor injuries at this point, but so far everybody's pretty safe and sound," San Ramon Valley Fire Protection District Assistant Chief Paige Meyer said.
At its peak, there were six engines working to fight the fire. Crews were able to get control of the blaze about 45 minutes after they arrived.
Both families were able to evacuate the homes safely with no injuries.
Investigators are still trying to determine what started the fire.