Two fathers who tried to set fire to a hotel housing asylum seekers in Rotherham showed a "dreadful example" to their young children, a judge has said.