Quartz has a hardness of 7 on the MOHS scale, while Topaz is an 8. That means that Topaz will scratch Quartz. You can try and scratch one of the gemstones with the other and which ever one is scratched will be Quartz. If you don't have any tools, you can use the visual look of the gemstones to try and differentiate them.