Scala join between two RDD

I’m new in scala, I have two Rdds and I want to perform a join between them. I have to find lat and lon for the tripID. The problem is when I try to perform a join I get an error it’s like it doesn’t recognize a join. Am I missing a library?
I followed the example on

import org.apache.spark.rdd.RDD
def trip(trips: RDD[Trip], stations: RDD[Station]): (Double, Double) = {
val lat = =>
val lon = => x.lon)
val location = List(lat,lon)
val tripId = 913401