This looks like a new feature request for Dolphin which can be entered at bugs.kde.org under the category “wish list” as Dolphin doesn’t have this feature like dual-panel file managers (e.g. Double Commander).
But you can use Compare Files context menu for this purpose by clicking “Save Item to Compare” on one file, and then “Compare with the Saved Item” on the other file.
Sorry, I’ve been using this context menu for such a long time that I forgot I might have customized it, perhaps adding these two menu items to a third-party Dolphin extension.
I could share it with you but perhaps it might be easier for you to download one that suits you via Settings > Configure Dolphin… > Context Menu > Download Services… You can search “compare” and choose one after looking at what they provided.
If I were I would start with “Compare using Meld” which seems to include exactly what you want in a dual-pane window.
My personal preference is Meld because I think it shows the differences between 2 text files better than others, but you can also see if a similar service is available also for Kompare, KDiff3 etc…
I guess this service becomes available if and when you install KDiff3.
I see that there’s nothing like the one in dual-pane file managers like Double Commander: the command Compare instantly compares the two files selected on both panes.
Dolphin service simply implement it in two steps:
Copy the first filename and path (e.g. echo %U > "/tmp/compare_file.tmp")
Compare the second file with the item just saved (e.g. meld "`cat /tmp/compare_file.tmp`" "%U"; rm "/tmp/compare_file.tmp"