You'll modify a function to implement the 2d collision detection algorithm for circles found at https://developer.mozilla.org/en-US/docs/Games/Techniques/2D_collision_detection#Circle_Collision (Note: that code is JavaScript, so you'll n code example
Example: javascript detect collision
if (rect1.x < rect2.x + rect2.width &&
rect1.x + rect1.width > rect2.x &&
rect1.y < rect2.y + rect2.height &&
rect1.y + rect1.height > rect2.y) {
// collision detected!
}