When a ton of wheat was being moved from Buffalo to New York City before the opening of the Erie Canal in 1825, it took three weeks and cost $100, but when the canal was used, it took less than eight days and cost less than $6.
In the above sentence, when incorrectly refers to it and "ton of wheat was being moved" is worn here. It does not refer to noun so there is a pronoun error but action(moving wheat). Buffalo refers to city here.(Actually I found out after googling otherwise i thought it refers to animal

) But indicates the contrast but used incorrectly here.
So A is wrong for reasons as mentioned above.
B. Moving a ton of wheat from Buffalo to New York City before the opening of the Erie Canal in 1825, it took three weeks and cost $100; using the canal, it
There is no proper verb for the 1st sentence and no proper relation between the independent clause and dependent clause.
It does not refer to noun instead refers to action(moving sth). Pronoun error as in A.
Improper usage of it is contd in 2nd sentence also.
C. Before the opening of the Erie Canal in 1825, moving a ton of wheat from Buffalo to New York City took three weeks and cost $100; on the canal the move
Here Moving becomes a gerund and all errors are corrected.
D. In 1825, before opening the Erie Canal, to move a ton of wheat took three weeks from Buffalo to New York City, which cost $100; moving it on the canal.
Before opening Erie canal incorrectly modifies 1825 thereby indicates wrong meaning.
It means as if The movement if wheat took place in 1825 and starting a sentence with infinitive is not preferred.
It implies that City costs 100$.
There is an error of pronoun ambiguity even though it appears to refer to wheat.
E. To move a ton of wheat in 1825 from Buffalo to New York City took three weeks before the opening of the Erie Canal, costing $100, but in using the canal, the move
errors in D repeated here.
It means as if The movement if wheat took place in 1825 and starting a sentence with infinitive is not preferred.
It implies that Canal costs 100$. but in using the canal is improper again.