We're much closer than you think Martin Ender's 2D programming language Alice has two different modes depending on what orientation the IP has: orthogonal (Cardinal mode) or diagonal (Ordinal mode). Commands in Alice change their meaning depending on which mode the program is in when they're executed. One especially interesting implementation of this is Alice's Z, or &quot;pack&quot;, command. For strings in Ordinal mode, this simply takes two strings a and b and interleaves (also known as &quot;zip&quot;) them. For example:
a = &quot;Hello&quot;
b = &quot;World&quot;
Z -&gt; &quot;HWeolrllod&quot;

However, while in Cardinal mode, Z pops two integers \$n\$ and \$m\$ and returns \$\pi(n,m)\$*, the Cantor pairing function. For example, for \$n = 2, m = 3\$, Z returns \$\pi(2, 3) = 18\$. The reasoning behind this is explained in this answer.
For clarity, the Cantor pairing function uses the following formula:
$$\pi(n,m) = \frac12(n+m)(n+m+1)+m$$

You are to write two non-identical programs that implement the two modes of Z. More specifically:

The first should take two non-empty strings containing only printable ASCII (0x20 to 0x7e) of the same length* and output these strings zipped/interleaved together
The second should take two non-negative integers \$x\$ and \$y\$ and should output \$\pi(x, y)\$ as specified above.

*: This isn't technically how the Z command works, read the Alice docs for more
You may input and output in any accepted method, and you may assume all inputs are reasonable for your language.
Your score is the Levenshtein distance between your two programs multiplied by the sum of the program lengths, aiming for a lower score. You can use this website to calculate Levenshtein distance.
Test Cases
For the first program:
a, b -&gt; Z
&quot;a&quot;, &quot;b&quot; -&gt; &quot;ab&quot;
&quot;Hello,&quot;, &quot;World!&quot; -&gt; &quot;HWeolrllod,!&quot;
&quot;World!&quot;, &quot;Hello,&quot; -&gt; &quot;WHoerllldo!,&quot;
&quot;Alice&quot;, &quot;     &quot; -&gt; &quot;A l i c e &quot;

The second program:
n, m -&gt; π(n, m)
2, 3 -&gt; 18
5, 5 -&gt; 60
0, 1 -&gt; 2
1, 0 -&gt; 1
100, 75 -&gt; 15475
Jelly, Score 1 * 8 bytes = 8
String zip:
+Ẇɼ+

Try it online!
Cantor pairing function:
+ẆL+

Try it online!
We use the fact that the Cantor pairing is equal to
$$ {n + m + 1 \choose 2} + m $$
Where the left term just happens to be the number of nonempty contiguous slices of \$m+n\$. This saves two bytes per program over the naive +‘×+H+, and one byte over the (less naive) +‘c2+.
Conveniently, in Jelly + zips strings (I had no idea!).
Explanations:
          Implicit input: strings s1, s2
+         Zip s1, s2.
 Ẇ        All nonempty slices.
  ɼ       Save the result to register (ignore previous 2).
   +      Zip s1, s2.

          Implicit input: numbers n, m
+         Compute m+n.
 Ẇ        All nonempty slices of implicit range m+n.
  L       Length.
   +      Add m.    


Note that there are many ways to get 4 for the pairing function (+R;S, +R+ƒ, etc)