This is an example of "proof by notation", which is where one use symbols to denote concepts in such a way that a claim appears to simply fall out of how objects are represented. A more direct proof by notation for this claim would be "Given $aH$ and $bH$, let $abH$ be the coset generated by $ab$ and $H$. I just defined $abH$, so clearly $abH$ is well-defined". That's clearly fallacious. In your proof, the fallacy isn't as blatant, but it's the same basic principle. You write $aHbH=(cH)(dH)$ = $cHdH$, but what does that even mean? You're relying on implicitly understanding what "two things next to each other means": after years of mathematics classes, you've gotten used to $(a)(b)$ and $ab$ both representing the same thing, namely $a$ multiplied by $b$, but do $(aH)(bH)$ and $aHbH$ both represent "multiplication", and what does "multiplication" even mean? Remember, "$aH$" and $bH$" represent sets. What does it mean to multiply to sets by each other?
The notation $aH$ relies of a basic understanding of cosets and is shorthand for the more complicated notation $\{ah: h\in H\}$. Once you have a solid understanding of cosets, you may be able to easily work with these shorthands, but this question is asking you to prove a basic property of cosets, so using a high-level shorthand is a bit inappropriate. The fallacy should be more clear if we dispense with this shorthand. Instead of writing $aH$, we have $\{ah: h\in H\}$. Instead of $bH$, we have $\{bh: h\in H\}$. And so on. Instead of $aHbH$, we have $\{ah_1bh_2: h_1,h_2 \in H \}$. And instead of $aH=cH,bH=dH$, we have $\exists h_3,h_4 \in H:c=ah_3, d = bh_4$. Now the claim that $aHbH=cHdH$ expands to the claim that $\{ah_1bh_2: h_1,h_2 \in H \} = \{(ah_3)h_1(bh_4)h_2: h_1,h_2 \in H \}$. And that, in turn, is equivalent to $\forall h_1,h_2 \in H, \exists h_1' ,h_2'\in H:ah_1bh_2=(ah_3)h_1'(bh_3)h_2'$.
That is, when you say $aHbH=(cH)(dH)$, you're invoking the entire complicated statement of $\forall h_1,h_2 \in H, \exists h_1' ,h_2'\in H:ah_1bh_2=(ah_3)h_1'(bh_3)h_2'$, and just saying "Well, I've written this claim in a form that makes it look like it's obviously true, so I'm going to just take it as true".
The problem with simply substituting one expression in for another is that $aHbH$ is not defined directly in terms of $aH$ and $bH$. We have $aHbH :=\{ah_1bh_2: h_1,h_2 \in H \}$, so $aHbH$ is defined in terms of $a$ and $b$. So just because $cH=aH$, that doesn't mean that substituting $cH$ in for $aH$ will give the same result: when you replace $a$ with $c$ in the formula $\{ah_1bh_2: h_1,h_2 \in H \}$, you're not guaranteed to get the same answer.
Suppose we had an operation $*$ on fractions that said "the numerator of the result is the sum of the input numerators, and the denominator is the sum of the input denominators". Then $\frac 1 2 = \frac 2 4$, but $\frac 1 2 * \frac 1 3 \neq \frac 2 4 * \frac 1 3$. This shows that $*$ is not well-defined on the rational numbers, because it looks at not the fraction as a whole, but the individual parts of its representation. Similarly, for non-normal subgroups, $aHbH$ is not well-defined, because it is defined not in terms of the cosets as a whole, but rather in terms of the individual parts of its representation ($a$ and $b$). Once you define an operation in terms of the representation of an object, then if the object has more than one presentation, you are no longer guaranteed to have a well-defined operation.