A train, an hour after starting, meets with an accident which detains it a half hour, after which it proceeds at $\frac{3}{4}$ of its former rate and arrives $3\tfrac{1}{2}$ hours late. Had the accident happened $90$ miles farther along the line, it would have arrived only $3$ hours late. The length of the trip in miles was: 
$\textbf{(A)}\ 400 \qquad \textbf{(B)}\ 465 \qquad \textbf{(C)}\ 600 \qquad \textbf{(D)}\ 640 \qquad \textbf{(E)}\ 550$
Let the speed of the train be $x$ miles per hour, and let $D$ miles be the total distance of the trip, where $x$ and $D$ are unit-less quantities. Then for the trip that actually occurred, the train travelled 1 hour before the crash, and then travelled $D-x$ miles after the crash. In other words, the train travelled for $\frac{(D-x)\text{mi}}{\frac{3x}{4}\frac{\text{mi}}{\text{hr}}}=\frac{D-x}{3x/4}\text{hr}$ after the crash. So, not including the half hour detention after the crash, the entire trip took
\[\left(1+\frac{D-x}{3x/4}\right)\text{hours}.\]
Now let us consider the alternative trip, where the accident happened $90$ miles farther along the line. Originally, the accident happened $x\frac{\text{mi}}{\text{hr}}\cdot(1\text{ hr})=x\text{ mi}$ down the line, but in this situation it happens $x+90$ miles from the line. Therefore the accident happens $\frac{(x+90)\text{ mi}}{x\frac{\text{mi}}{\text{hr}}}=\frac{x+90}{x}\text{hr}$ into the trip. The length of the remaining part of the trip is now $D-x-90$, so the remaining trip takes $\frac{(D-x-90)\text{mi}}{\frac{3x}{4}\frac{\text{mi}}{\text{hr}}}=\frac{D-x-90}{3x/4}\text{hr}$. So, not including the half hour detention after the crash, the entire trip took
\[\left(\frac{x+90}{x}+\frac{D-x-90}{3x/4}\right)\text{hours}.\]
We are given that the trip that actually happened resulted in being $3.5$ hours late, while the alternative trip would have resulted in being only $3$ hours late. Therefore the first trip took exactly $\frac{1}{2}$ hour more:
\[1+\frac{D-x}{3x/4}=\frac{x+90}{x}+\frac{D-x-90}{3x/4}+\frac{1}{2}.\]
After simplification and cancellation, we get the equation
\[0=\frac{90}{x}-\frac{90}{3x/4}+\frac{1}{2}.\]
Therefore $(90/x)+(1/2)=(120/x)$, so $1/2=30/x$. We solve for $x$ and have the original speed of the train: $x=60$.
We must now solve for the length of the actual trip. If the train had gone $60\frac{\text{mi}}{\text{hr}}$ for the entire trip, then it would have taken $\frac{D}{60}\text{hr}$, and the train would have been on time. But the trip actually took $1+\frac{D-60}{45}$ hours, not including the half-hour detention, and the train was $3.5$ hours late. Therefore
\[\frac{D}{60}+3.5=1+\frac{D-60}{45}+0.5\Rightarrow 3D+630=180+4D-240+90\Rightarrow D=600.\]
The length of the trip in miles was $\boxed{\textbf{(C)}\ 600}$.