Move object to certain coordinates on click on another object

Hello, respected Unity 3d developers community)
I’m really new to coding, that’s why the question might seen lame)
As it is.

What I’d like to do:
there are objects A, B and Drive.
When clicked on object A object Drive should move (with constant speed) to 0,0,20 and stop there.
When clicked on object B object Drive should move to 0,50,0.

Shortly, move certain object to different certain coordinates when clicked on different objects.

Thanks a lot for your help)
And, yes, I’ve looked through dozen answers,
they are so close, but not exactly what I need)

Use Vector3.Slerp.


// when pressing A
Drive.transfrom.position = Vector3.Slerp(Drive.transfrom.position, new Vector3(0,0,20), Time.deltaTime * speed);

// when pressing B
Drive.transfrom.position = Vector3.Slerp(Drive.transfrom.position, new Vector3(0,50,0), Time.deltaTime * speed);