@John, I would use simple geometry.
You say "Coordinates of the centre of the circle (y,z) should be within the bounds 12.5 and 17.5." I assume that you mean
Given points P2=(y2,z2) and P3=(x3,z3). Find the largest circle passing through P2 and P3, whose center is in the rectangle with corners P0=(y0,z0) and P1=(y1,z1), where y0<y1 and z0<z1.
The set of circle centers lie on the perpendicular bisector of P2,P3. The biggest circle will be where the perpendicular bisector intersects one of the edges of the bounded region. The perpendicular bisector will intersect the edges of the bounded region at 0, 1, or 2 points. Identify the intersection points, if any. The intersection point that is farthest from the midpoint of P2,P3 is the center of the circle with the largest radius.
Perpendicular bisector: y-ymid=m(z-zmid), where ymid=(y2+y3)/3, zmid=(z2+z3)/2, m=(z2-z3)/(y3-y2).
Edges of the bounded region:
Edge 1: y=y0, z0<=z<=z1.
Edge 2: y=y1, z0<=z<=z1
Edge 3: y0<=y<=y1,z=z0
Edge 4: y0<=y<=y1,z=z1
Check the edges:
Edge 1: y0-ymid=m(zc1-zmid) => zc1=(y0-ymid)/m+zmid. If z0<=zc1<=z1, then C1=(y0,zc1) is a viable answer, so save it.
Edge 2: y1-ymid=m(zc2-zmid) => zc2=(y1-ymid)/m+zmid. If z0<=zc2<=z1, then C2=(y0,zc2) is a viable answer, so save it.
Edge 3: yc3-ymid=m(z0-zmid) => yc3=m(z0-zmid)+ymid. If y0<=yc3<=y1, then C3=(yc3,z0) is a viable answer, so save it.
Edge 4: yc4-ymid=m(z1-zmid) => yc4=m(z1-zmid)+ymid. If y0<=yc4<=y1, then C4=(yc4,z1) is a viable answer, so save it.
If there was 1 viable answer, it is the answer.
If there were 2 viable answers, the answer is the one that is farther from Pmid=(ymid,zmid).