I asked

"Show mathematically that to produce an image that is the same size as the object in a concave mirror, the object needs to be at twice the focal length from the mirror."

and you answered:

"1/o + 1/o=1/f
1/2f + 1/i=1/f
1/i=1/2f
i=2f

M=di/do= 2f/2f= 1

check my thinking."

could you please explain, I'm not really following.

If the object and image are the same size, they muat be at equal distances from the mirror. What Bob did was make use of that fact and substitute the object distance do for the image distance di in the first mirror equation. It tells you right away that 2/do = 1/f, therefore do = 2f = di