How can I get velocity of the collider?

I’m trying to get the velocity of the collider but getting an error? How can I do this?
97473-unity3333.jpg

Try using:

if (colInfo.collider.GetComponent<Rigidbody2D>())
        rb.velocity = ((rb.velocity) / 2) + colInfo.collider.GetComponent<Rigidbody2D>().velocity;