In addition to using the like expression there is another similar way:
.join( b.alias("b"), col("a.city").contains(col("b.city")) )
because the contains function also works as a join condition.