There are 2 circles, the smaller one has its center on the bigger circles border, from that how can you calculate the coordinates the closest point on the smaller circle to the center of the bigger one.

I want to find the coordinates of the closest point of the circle given that I have the height and width and radius of both circles and the position of both circles.
If you are certain that the small circle has the centre on the larger circles border then find the tangent to the point on the small circle that connects the centre on the small circle to that of the centre of the larger circle.
After that we have the equation: X = (x-x1) & Y = (y-y1) From distance formula: (X^2 + Y^2)^1/2 = C where C is the radius of the larger circle.
Equate this equation with the tangent of the point on the small circle as mentioned earlier as a simultaneous equation and you will get both x and y coordinates of the closest point.