To find out how many miles Rory's cousin will drive, we need to subtract the amount of miles that Rory drove the first day all by herself.
584 - 300 = 284
Then, we know that Rory's cousin split the distance with Rory evenly the remaining amount, so we can just divide by 2 to find out how far her cousin drove.
284 / 2 = 142
Rory's cousin drove 142 miles.
Hope that helped =)