In theory, you could use the following code (untested):
# other code here
# if using move_and_collide:
collision_data = move_and_collide(velocity, Vector2.UP)
if (collision_data != null):
if (collision_data.collider is KinematicBody2D):
# NOTE: this assumes the base KinematicBody2D is in a group called
# base - this is just for making sure we only apply the base's velocity
# and not the velocity of any KinematicBody2D
if ("velocity" in collision_data.collider and collision_data.collider.is_in_group("base")):
# apply the velocity of the collided object
velocity += collision_data.collider.velocity
# if using move_and_slide, it is more or less the same thing, you just need
# to use the get_slide_collision function instead
I have no idea if the above will work though, I just wrote it off the top of my head. That is how I might try to solve the issue initially. There are probably better ways to do it though. I would suggest looking at tutorials for moving platforms in 2D, as the basic idea for a moving platform should work with a moving base.