The most applicable mode of transmission in this case would be the airborne mode of transmission.
The reason why this is the most probable is because the person who was next to the infected one also himself suffered from this disease through inhaling the infected air.