 One can appreciate how Frege and Hilbert might have failed to engage with one another by considering a simple analogy.  Consider the inference from “\(x\) had a nightmare” to “\(x\) had a dream” and ask the question, is the latter a logical consequence of the former? If one examines the inference purely formally, as Hilbert might, then the sentences have the form ‘\(Fx\)’ and ‘\(Gx\)’ and the question becomes, does \(Fx\) logically imply \(Gx\)?  The answer for Hilbert would be ‘No’, because one can interpret ‘\(F\)’ and ‘\(G\)’ in such a way that the inference fails, e.g., just assign the standard meaning of ‘dream’ to ‘\(F\)’ and assign the standard meaning of ‘nightmare’ to ‘\(G\)’, i.e., interpret ‘\(F\)’ as the property having a dream and interpret ‘\(G\)’ as the property having a nightmare. This shows that, from this purely formal point of view, “\(x\) had a nightmare” doesn’t logically imply “\(x\) had a dream”. (From this purely formal viewpoint, one additionally needs the premise \(\forall y(Fy \to Gy)\) to infer \(Gx\) from \(Fx\).)