Firebase data usage

I’m making a delivery app between 3 fixed locations using drop down and same prices , I’m done with the UI , log in and signup and I’m stuck in the following;

  1. How do I use fire base in selecting the location and calculating prices?
  2. What data do I need to save in the back end (fire base)?

I’m not clear on your questions due to lack of information but I’ll share some insights in case that helps.

I would create the following data structure in firebase:

list [
  object {location: "location name1", price: 1234},
  object {location: "location name2", price: 546},
  object {location: "location name3", price: 789},