Please consider the follow two sentences:
It is hard to agree that by increasing sports facilities is the best way to improve public health.
The best way to improve public health is by increasing the number of sports facilities.
Why the first sentence does not need the preposition "by" while the second one does.