That depends strongly upon the precise surfaces- and to have a formula, you have to have a coordinate system. You appear to have pieces of two cylinders. Setting up a coordinate system so the axes are along the x and y axes, with radii r, they would be given by and then we would have which reduces to . That is, the projection of that curve of intersection in the xy-plane (Was that what you meant by "if it was flat and not 3D"?) would be y= x or y= -x, depending upon exactly how you set up the axes. To write the curve in 3D, you would need parametric equations- take x= t, y= t and then . Or if you mean as it would be written in the plane the curve lies in, which is the plane y= x, then it would be just or, equivalently .
All of those are, of course, part of a circle.