how can a convex lens form a real and a virtual image together
Your question does not make sense.
Convex lens forms both virtual and real images but not at same time. Real images are formed only behind the lens, whereas virtual images are formed in front of the lens. The size of a virtual image is larger than the size of the object, whereas the size of a real image may be the same, smaller, or larger than that of the object, depending on the distance of the object from the lens.