I did the walk the other way, from Whitby to Robin Hood's bay, and it's not 18 miles. I went along the road, setting off about 9 in the morning, and I was there by 1 in the afternoon. Robin Hoods bay has lovely windy streets and paths to explore, but there's not that much to do.
I had intended to stay at Robin Hood's youth hostel, but instead i walked on to Scarborough, which is a long way, finally arriving about 8pm, to find the youth hostel shut. Ha!
I would say the walk from Whitby to Scarborough is probably between 13 and 16 miles given it tooke me about 6 hours after I'd decided to stop walking along the beach cause I thought i was going to drown. (time includes a climb up the cliffs to escape certain death.)