A man has been jailed after a petrol bomb was thrown at a Rotherham home where seven people, including an 11-month-old baby and two children, were inside.