Your goldfish are too young to mate.
They look to be hiding together. I've seen goldfish do that when they are stressed/scared.
How big is your tank? Judging from the photo, I'm afraid its undersized. Comet goldfish (the kind you have) get HUGE. They need to be stocked at 40 gallons per fish indoors, or housed in a pond because they grow... and grow... and grow... upwards of 12 inches, even. This means that if you do not give them enough room they will soon start having issues with the water quality, if they aren't already. Goldfish are messy fish, producing much waste and need adequate water volume to dilute the toxins produced via waste and respiration. Even now your goldfish may be experiencing the discomforting effects of ammonia or nitrite quantities in the water. If you haven't cycled your tank, here is a helpful article: (Link is not visible to guests. Please register to view.