First imagine a character with a 90% skill vs. a character with 30% skill. Basic probabilities are as follows, ignoring criticals and fumbles:
Ninety wins, Thirty loses => 0.90 * 0.70 = 0.63 or 63%
Ninety loses, Thirty wins => 0.10 * 0.30 = 0.03 or 03%
Ninety loses, Thirty loses => 0.10 * 0.70 = 0.06 or 07%
Ninety wins, Thirty wins => 0.90 * 0.30 = 0.27 or 27%
So the question is really about the last case, which is either second-most probable or most probable (e.g. if both characters's skills are above 50%)
BTW, "Roll high but not over" is mathematically equivalent to "Roll under for the largest difference", and requires one less subtraction.
I'll crunch some numbers for percentiles, but in the meantime take a look at my
HeroQuest probability table. HeroQuest uses opposed d20 rules, with 1 a Critical and 20 a Fumble; if both characters succeed or fail, the one with the lower absolute roll loses. The "Marginal Victory" and "Marginal Defeat" columns represent the last case; the 18 vs. 6 row is roughly equivalent to 90% vs. 30%.