Why not have a couple of boxes. You can enter a different team ID in each and then itll compare the two, rather than doing it in the URL
Or maybe a link on the match page, which means that you still have to put in the effort to find at least one time the two teams have played but not require manual entry.