Mohammed Nawaz had barged his way into the house in Hall Green and, after being confronted by the woman's 49-year-old son, sprayed both victims with a hot chilli and water mix from a washing up bottle.
The 52-year-old then ran out of the house before being grabbed by a man who had heard the commotion and walked over to see what was happening.
Although the man was sprayed by the substance from Nawaz's bottle, he was able to pin him down with the help of other passers-by before officers from West Midlands Police arrived at the scene.
Nawaz, of no fixed abode, was arrested and charged with attempted robbery and three counts of administering a noxious substance.
Nawaz, who has 36 previous offences for burglary, robbery and theft, was jailed for nine years and one month after pleading guilty at Birmingham Crown Court on Friday.
Investigating officer, detective constable Arita Chonkria, said: "We believe Nawaz saw the woman as an easy target, someone he could deceive or quickly steal from, but he hadn’t counted on her son being in the house.
"This was a shocking ordeal for the woman and her son but thankfully neither were seriously hurt. And I hope they can take comfort from the fact the offender has been jailed for several years.
"I also want to thank the man who tackled Nawaz as he tried running off.
"It’s really appreciated, so thank you and we’ll be looking to formally recognise his efforts when our force awards scheme gets back up and running post Covid."
Nawaz was jailed for a similar offence in 2010 when he broke into a 93-year-old’s home in Sparkhill and again squirted a substance in their face before stealing items.