how will it (the brain) decide from where these are originating from?
The brain doesn’t have to “decide” anything. Light rays from different points on the object will be brought to a focus at different points of the image (the diagram shows the paths of just two light rays which originate from the same point). In normal vision the lens of the eye can make this image lie on the retina. The muscles of the eye can make small changes to the shape of the lens to bring the image into focus on the retina (and specifically around the fovea, which is the most important part of the retina for detailed vision). This adjustment of the lens is called accommodation
With short sight or long sight the image may be brought into focus in front of or behind the retina, and the eye needs some help to bring the image into focus on the retina. This is what external lenses in spectacles do. External lenses may also be used to make images larger than they would normally be so that the brain can see more detail in the image - this is how magnifying glasses, binoculars, microscopes and telescopes work.
But in any case, all the brain perceives is an image on the retina. The brain does not need to “decide” how far away the object is (although there are ways it can do this if you are using both eyes, or if you move your viewpoint) and does not know anything about any lenses between the eye and the object.
Obviously the brain can tell something about the shape and direction of the source object from its image (although optical illusions exploit the ambiguities in this process). But if the brain could tell the distance and size of the source object from a single image then pictures, computer screens and televisions could not fool the brain into perceiving a three dimensional scene instead of a patchwork of colours on a flat surface. And moving your viewpoint around only helps you determine the relative distance of two objects, not their absolute distance. To determine absolute distance you would need to use some sort of active imaging system such as sonar.