Cannot tell from your picture how the connection was made or what is left of the pipe down in the hole.
Assuming that is a section of pipe in the ground, and not the bell of a fitting, you will have to chip out all the way around the pipe so that a coupler can be installed on the pipe and the riser extended up to floor level. If the closet bend is broken off in the ground, then the entire thing will need to be cut out and replaced.
I doubt there is such a thing as a "longer offset flange". If that is a full 12" tile, it would appear that the rough-in is close to being the correct distance from the wall.