The equation of a sphere centered at (h, j, k) with radius r is
... (x -h)² +(y -j)² +(z -k)² = r²
The sphere can have a radius no larger than the distance to the nearest octant boundary, one of x=0, y=0, or z=0. That is, the radius must be 3, so the equation is
... (x -3)² + (y -3)² + (z -6)² = 9