Quick edit, I suddenly realized that the second measurement was the diameter, kind of confused me, for a moment... The nutshell answer then is that it doesn't really. I'll leave the rest of my answer to explain what does matter...
Focal length and aperture do effect image quality, but they're hardly the only things! The ability of the lens to transmit light is measured as MTF (modulation transfer function) which is basically a way to measure how much light is lost in passing through the lens. Some lenses are fairly poor at this, others are incredibly good, but none pass all the light. This ability will be a very large factor in image quality.
In any case, getting back to focal length and aperture...
Telephoto lenses tend to have less variation in sharpness across the aperture range versus wide angle lenses. A big part will be the narrowed field of view, there's simply less "stuff" in the frame. However, telephotos will have less depth of field, so things in front or behind the subject may not be in focus. This, by the way, is often desirable as it makes the main subject 'pop' in the image.
Prime lenses will typically be sharper versus zoom lenses at the same focal length, this is a function of simpler optics as they have less glass which usually translates to less loss of light. Though there are some very impressive zooms that approach prime lens capability, including some Nikkor lenses.
Professional grade lenses will typically be sharper versus consumer grade lenses because of the quality of the materials being used. Pro lenses will usually have better quality optical elements, leading to less light loss, and better coatings to help reduce flare and other stray light annoyances. You pay a price at the cash register, however, for that!
Your lenses aren't variant in their focal lengths and if their optical qualities aren't too divergent, you may not see any real difference because you have the same aperture. Bearing in mind, of course, you're probably reviewing them resized to screen and that will sharpen. However, don't fall into the pixel peeping trap, 100% on your monitor isn't a reasonable comparison to print.