If the images are not related to each other, but you want to place them on top of the page together for stylistic reasons, you probably want a simple minipage environment with two figure environments inside.
https://commons.wikimedia.org/wiki/File:Latex_example_subfig...
You can reference either the whole figure by using the label inside the figure environment, or you can reference the subfigures using labels inside the subfigure environments.
I'm not saying it doesn't work. I'm saying that if your needs are simple enough, you can get away without it.