A 29-year-old man who intervened in an argument between his mum and her partner has been locked up for attacking him.