So the formula is F=Gm1m2/r^2. Could you substitute one of the mass values for an energy value since gravity attracts energy ? Or would this require a different equation?
Simply, gravity "attracts" mass in Einstein's theory and not in Newton's which the equation is from . There gravity isn't an "attraction" like in Newton's theory. Is is a distortion in spacetime where the mass will follow the distortion. Continue your search about gravity and try reading more about General relativity and space! Have fun!.
Watch this video . Hopefully, it will set you on the right track. (note the video is not the actual representation of gravity in Einstein's theory but it makes it easier for you to visualize it)
Note: My post might have some errors and wrong physics/terminology, so I will leave it for the experienced to correct me
I have never been in a physics classroom. And now I am continuing to my second year undergrad in physics! You are curious and that what matters !:thumbs: