Could Britain or Germany afford a war with the United States in 1898?
Short answerYes. Both European powers had stronger naval forces in the relevant theaters, while the United States was still building up and remained constrained by Congress.
NotesTreating the United States of 1898 as the naval superpower it became after 1945 projects later strength backward. Germany's Asiatic Squadron was stronger than its American counterpart, and a U.S. fleet sent to Europe would also face a stronger German fleet. Britain represented an even larger disparity in ships and worldwide naval reach. American expansion was underway but still constrained by Congress, while the later Royal Navy's care not to embarrass the Great White Fleet reflected the imbalance that persisted even within a friendlier relationship.