The answer is: a) near coal mines to easily access the coal needed to help run them.
While factories were also located in cities for worker access and some were built by rivers for water power before the steam engine, the advent of steam power made coal a critical resource for running the engines. Therefore, proximity to coal mines became increasingly important for factories utilizing steam engines.