Assuming that there is no difference in files and strings (we will use $s_1$ and $s_2$), we can look at the hasing speed and pre-images and collision attacks.
We assume + as concatenation summation and space as concatenation, and replacing the usual $\mathbin\|$ with concatenation to remove the ambiguity.
We start with the simple ones;
-
CREATE HASH [(String + File)] = HASH-RESULT
$$h = H(s_1) + H(s_2)$$
The obvious attack is replacing $s_1$ with $s_2$ and $s_2$ with $s_1$ and we will get the same hash value since addition is commutative;
$$H(s_1) + H(s_2) = H(s_2) + H(s_1)$$
- This is second pre-image attack for a given hash value, and
- Collision attack if the attackers are free to choose the $h$ value.
For a given $h$ value, we need to find two inputs that their has summation is equal to $h = H(a) + H(b)$
Besides, there is a bit of overflow possibility with addition. If only $\ell$ size is required ( that is the output size of $H$ ) one must trim the result. This can also create some additional collision, pre-images cases, too.
If we look at random selection we will have the classic birthday calculation if we assume addition is performed modulo $2^\ell$
Also, for performance reasons, this uses double call of the hash function.
-
CREATE HASH [( (String)(File) )] = HASH-RESULT
$$h = H(s_1 \mathbin\| s_2)$$ This has the usual concatanion and the usual collision problem if there is no good delimeters is used;
$$h = H(\texttt{abcdef} \mathbin\| \texttt{zod}) = H(\texttt{abc} \mathbin\| \texttt{defzod}) $$ To mitigate a delimimeter that is not exist in the inputs is preferred
$$h = H(\texttt{abcdef} \mathbin\| <delimeter> \mathbin\| \texttt{zod}) $$
-
CREATE HASH [(HASH(String)) + (HASH(File))] = HASH-RESULT
$$h = H(H(s_1) + H(s_2))$$ This construcion uses triple has call. Still, The attacks on the 3ed case are problems here since the input to the last hash is not changed.
-
CREATE HASH [( (HASH(String)) (HASH(File)) )] = HASH-RESULT
$$h = H(H(s_1) \mathbin\| H(s_2))$$ It has the same problem as the case 4 with the triple hash function call. The mitigations still work, thoug.
Conclusion
The case 4 with the delimeter is the best choice here
$$h = H(\texttt{abcdef} \mathbin\| <delimeter> \mathbin\| \texttt{zod}) $$