You want to determine the maximum value $n \in \{0,1,2,3,4\}$ so that if you flip exactly $n$ heads, you do pay the $1\$$ to re-flip. This means that if you flip $(n+1)$ heads, you do not re-flip.
Let $E(n)$ denote your overall expected value as a function of $n$, where $n$ is as defined in the previous paragraph. You want to find all values of $n$ such that $E(n) \geq (n+1).$
This is because if you get $n$ heads, and decide to reflip, you are paying $1\$$ and forfeiting the $n\$$, for a total expenditure of $(n+1)\$$. You want to identify those values of $n$,where this expenditure is not greater than your expected value on a re-flip.
Consider $E(1).$
You are paying (in effect) $2\$$.
In exchange, $(5/16)$ of the time, you will be in the same position that you were in, $(6/16)$ of the time you get $2\$$, $(4/16)$ of the time you get $3\$$, and $(1/16)$ of the time you get $4\$$.
Therefore,
$$E(1) = (5/16)E(1) + (1/16)[25] \implies $$
$$(11/16)E(1) = (25/16) \implies E(1) > 2.$$
So, if you only get $1$ head, you should re-flip.
Consider $E(2).$
You are paying (in effect) $3\$$.
In exchange, $(11/16)$ of the time, you will be in the same position that you were in, $(4/16)$ of the time you get $3\$$, and $(1/16)$ of the time you get $4\$$.
Therefore,
$$E(2) = (11/16)E(2) + (1/16)[13] \implies $$
$$(5/16)E(2) = (13/16) \implies E(2) < 3.$$
So, if you only get $2$ heads, you should not re-flip.
Best Answer
You shouldn't play since the probability of winning \$10 is $\frac {1} {2^4} = \frac{1}{16}$. So, the expected payout is $\frac{10}{16}<1$ (the cost of playing is 1\$).
EDIT: OP mentioned in the comments that you can actually continue playing this game. So, if you get 2 heads and 2 tails for example, you can pay another 1\$ and toss the two remaining coins and keep repeating this process till you get all 4 heads. This makes the problem slightly more interesting. We can now think of the process as a Markov chain with 5 states. Each state represents the number of heads accumulated so far (0 through 4). It is clear that you won't go backwards. If you have 2 heads for example, you can only go to states 2, 3 or 4 if you play again. The complete Markov matrix for this game becomes (some entries left blank for you to fill in) $$Q= \left[ \begin{matrix} \frac 1 {16} & . & . & . & \frac{1}{16}\\ 0 & \frac{1}{8} & . & . & \frac 1 8\\ 0 & 0 & \frac{1}{4} & \frac 1 2 & \frac 1 4\\ 0 & 0 & 0 & \frac 1 2 & \frac 1 2 \\ 0 & 0 & 0 & 0 & 1 \end{matrix} \right] $$
It is clear that the last state (4 heads) is an absorbing state. If you keep playing, how many times (on average) will you need to pay 1\$ before you reach the absorbing state of 4 heads and collect your 10\$ reward? This is the number of steps within transient states for the Markov matrix. Refer here for the fact that the average number of steps needed before getting to the 4\$ absorbing state is the very first entry of the vector:
$$t = (I-Q)^{-1} \Bbb I$$
Here, $I$ is the identity matrix and $\Bbb I$ is a vector of all ones. If this expected number of steps is less than 10, you should certainly play the game.
Another less precise and more intuitive way to look at this (if someone stops you on the street and offers you the opportunity and you can't invert matrices in your head) is that the number of remaining coins roughly halves on average every time you play. So, you should need on the order of $\log_2(4)$ tosses until all four coins become heads. This is roughly the amount you'll end up paying and much smaller than the 10\$ reward waiting for you.