You need to recall that Hume re-analyses causation. Humean causation is not causation as usually understood. The standard idea of causation is that causes necessitate their effects, that given the cause (event A) the effect (event B) cannot but happen. In other words the standard idea runs on a notion of a necessary connexion between causally related events.
Hume has no time for the notion of necessary connexion. In the realm of events we have no experience of necessary connexion. How can you perceive one event necessitating the occurrence of another ? All you actually experience is the perception of one event followed by the perception of another. As an empiricist, Hume takes the position that what is not experienced has no place in epistemology : so necessary connexion, as unexperienced and unexperiencable, has no place.
Hume's reworking of causation goes like this. When A-type events (1) precede B-type events, when A-type events are (2) close in space and time ('contiguous) to B-type events, and when A-type events are (3) 'constantly conjoined', so that there is an unbroken regularity between the two types of event, then we say and are entitled to say that when a particular A type event occurs it causes a particular B-type event.
There is no compulsion or necessity here; causation is just a matter of a specific kind of regularity. Causes do not necessitate their effects; to invoke causal relations is simply to describe what, under the above conditions, happens.
(Tratise of Human Nature, I.3.1-14; I, iv, 7; Enquiry concerning Human Understanding, 4-7.)
If this is so, then if all events are causally determined there is still no threat to free will. If I have free will, my actions (as events) are exempt from causal necessitation since causes, Humeanly analysed, necessitate nothing.
Free will and causal determinism are compatible. How could they possibly come into conflict on Hume's view of causation ?
Hume does recognise that free will can be nullified but his argument here follows a quite different path. For Hume, free will is a matter of my actions expressing my character T II.3.1) or disposition (T II.3.2), or (say) my wants and preferences, unimpededly. If you coerce me or exercise physical power over me, then I do not act freely. My 'liberty of spontaneity' (T II.3.2) is defeated. In the familiar slogan, free will is opposed not to causation but to coercion.