First, you would want to find the smallest number that both 6 and 4 are factors of.
6 : 6, 12, 18, 24
4: 4, 8, 12, 16, 20, 24
The lowest number that 6 and 4 meet at is 12, so add 12 days to July 31st to find when they next meet.
July 31st + 12 = August 12th
The next day that Nick and Mark will both have tennis practice would be on August 12th.