Mahib walked for two days. On the second day he walked 2 hours longer and at an average speed 1 mile per hour faster than he walked on the first day. If during the two days he walked a total of 64 miles and spent a total of 18 hours walking, what was his average speed on the first day?