A cyclist rode 40 miles before having a flat tire and than walking 5 miles to a service station. The cycling rate was four times the walking rate. The time spent cycling and walking was 5 hours. Find the rate at which the cyclist was riding.