How can i make to get the driver realtime location and passenger location.
The Driver app should use GPS to get the Location. On Locationchange you upload the new Location to your server or store it in a Firebase Realtime Database or Firestore Database.
The Passenger app send his Location to your Server too.
You can use an Intent to Open GoogleMap app to Navigate to the given Location (the one from the Passenger) in your Driver App after the driver app requests the stored passender location from your server.
All in all this is a more complicated/complex Solution than you may think. And you wrote in another thread that you are not own any Server (this is probably a problem you need to take care of too).
My answer here is just a base plan (Ideas); It depends on a lot of things you need to Consider.
Note that there is no example code for this; at least i did not see any in the Forum.
You really should start with simpler Apps as i think this is over your knowledge.