Complex sentence: When Jack complained about the mess and the man apologised but told Jack to'keep his hair on', Jack gave him a vicious beating in front of all the neighbours.
Split into simpler sentences: When Jack complained about the mess, the man apologised but told Jack to'keep (his) hair on'. In response to this, Jack gave him a vicious beating in front of all the neighbours.