You’re thinking in a productive direction, but your counting is way off. First, you have to be a bit more careful in picking $i$; you should specify that it’s the number of the first T. The $i-1$ tosses before the first T must all be H, so there’s only one way that they can turn out. The $k-i$ tosses after the first T are another story: they can be anything except all T’s. There are $2^{k-i}$ possible strings of $k-i$ heads or tails, and only one of them is ruled out, so there are $2^{k-i}-1$ possibilities for the $k-i$ tosses after the first T. That is, there are $2^{k-i}-1$ sequences of $k$ coin tosses that have their first T’s on the $i$-th toss and have at least one H after that. The correct answer is therefore $\sum_{i=1}^{k-1}\left(2^{k-i}-1\right)\;.$
This can be simplified if you substitute $j=k-i$: then $j$ runs between $1$ (when $i=k-1$) and $k-1$ (when $i=1$), so
$\sum_{i=1}^{k-1}\left(2^{k-i}-1\right)=\sum_{j=1}^{k-1}\left(2^j-1\right)=\sum_{j=1}^{k-1}2^j-\sum_{j=1}^{k-1}1=\sum_{j=1}^{k-1}2^j-(k-1)\;.$
To finish simplifying the result, just use the formula for the sum of a finite geometric series.
By the way, there is a completely different way of analyzing the problem that leads to the final result a bit faster. There are $2^k$ possible outcomes when you toss a coin $k$ times. Which of them do not have the property that there is at least one T and at least one H after the first T? Obviously a string of $k$ heads, but there are others. In fact, these ‘bad’ strings are precisely the strings that consisting of $i$ heads followed by $k-i$ tails for $i=0,\dots,k$; how many bad strings are there, then, to be subtracted from $2^k$?