Adding Zip Code and City autopopulate to a form

So we want to make a form that works like this

If you notice for the moving from - you put in the zip code and it comes to match a database. Then in the moving to - you can type a zip code or city.

Does anyone know how to do this for us? Thanks!!!