Let's denote the number of home runs Hassan hit as \( h \). According to the problem, Andre hit 4 more home runs than twice the number of home runs Hassan hit. This can be represented as:
\[ \text{Andre's home runs} = 2h + 4 \]
Since together they hit a total of 10 home runs, we can set up the following equation:
\[ h + (2h + 4) = 10 \]
This equation can be simplified to find the total number of home runs Hassan hit.