Hi,
have you got the script updated? I browsed thru your code and seems that you're almost there - only thing missing is to A) read the polygon data and B) add function that checks which polygon is under the last coordinate of the distance result. Luckily both are fairly simple procedures.
For polygons you actual have couple of choices. You could write polygon coordinates straight to the code or, if you need to change areas more easily, keep it as a local file that is read when page is loaded. You probably could also read them from "the cloud" (MyMaps service) but since Google keeps closing their "free" services every week or two nowadays, I'd recommend minimizing dependencies and just keep the data local.
Part B/checking-correct-polygon is few lines where you now have those HOWEVER, IF, THEN... placeholder rules. There is function containsLocation() in Google Maps library for exactly this purpose.
And that's about it. My bid here, £60, would be for all the work until page works as required. Delivery in a day or two from project acceptance. If you decide to implement this by yourself (definitely not impossible if you managed to "jiggle" code this far) feel free ask tips in chat, happy to help out if I can!
Thanks looking and best of luck with the project.
With respect,
Tatu // Vipunen Solutions