[subject] + 总算 + [verb phrase] + 了
[sentence],总算 + [verb phrase]
总算 goes before the verb and says something wanted has happened after a long time or a lot of effort. It carries relief, and the sentence usually ends in 了.
The first clause often says how long it took.
After a clause about something disappointing, 总算 points to the part that turned out all right: "at least".
Both mean "finally". 终于 just marks the end of a long wait, so it fits good and bad outcomes. 总算 is only for an outcome you wanted, and only 总算 has the "at least" use.