[Question]
  [
We've recently reached the threshold of 10,000 questions on PPCG. Hooray! Let's celebrate this with a simple challenge.
## Input
Two integers \$A\$ and \$B\$, both in \$[1..9999]\$, such that \$A+B<10000\$.
## Task
Your task is to add one single digit to one of these integers or one single digit to both of them such that \$A+B=10000\$. If adding a digit to both \$A\$ and \$B\$, it need not necessarily be the same digit.
The new digit can be added at the beginning, at the end or anywhere in the middle of the original integer. However, you can't add a leading zero.
*Example:*
For \$A=923\$, the following transformations are valid:
$$\color{red}1923\\92\color{red}73\\923\color{red}8$$
But these ones are **invalid**:
$$\color{red}{0}923\\\color{red}{10}923\\9\color{red}{4}2\color{red}{7}3$$
Given \$A=923\$ and \$B=72\$, there are two possible solutions:
$$923\color{red}8 + 7\color{red}62 = 10000\\92\color{red}73 + 72\color{red}7 = 10000$$
## Output
You must print or output a list of all possible solutions.
For the above example, the expected output would be `[[9238,762],[9273,727]]`.
## Rules
* I/O can be processed in any reasonable, unambiguous format. You may use strings, lists of digits, etc. instead of integers.
* The input is guaranteed to have at least one solution.
* You are allowed not to deduplicate the output. However, it would be appreciated if the test code is deduplicating it with some post-processing, for instance in the *footer* section of TIO.
* This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge.
## Test cases
```
Input    --> Output
934, 654 --> [[9346,654]]
737, 628 --> [[7372,2628]]
9122, 88 --> [[9122,878]]
923, 72  --> [[9238,762],[9273,727]]
998, 3   --> [[9968,32],[9987,13]]
900, 10  --> [[9900,100],[9090,910]]    NB: solutions such as [9000,1000] are NOT valid
                                            (more than one digit added to 10)
363, 632 --> [[3673,6327],[3638,6362]]
288, 711 --> [[2881,7119],[2882,7118],[2883,7117],[2884,7116],[2885,7115],[2886,7114],
              [2887,7113],[2888,7112],[2889,7111]]
365, 635 --> [[365,9635],[1365,8635],[2365,7635],[3365,6635],[4365,5635],[5365,4635],
              [6365,3635],[7365,2635],[8365,1635],[9365,635],[3065,6935],[3165,6835],
              [3265,6735],[3465,6535],[3565,6435],[3665,6335],[3765,6235],[3865,6135],
              [3965,6035],[3605,6395],[3615,6385],[3625,6375],[3635,6365],[3645,6355],
              [3655,6345],[3675,6325],[3685,6315],[3695,6305],[3650,6350]]
```
  
[Answer]
# [Haskell](https://www.haskell.org/), ~~99 97 82~~ 81 bytes
-16 bytes thanks to [Delfad0r](https://codegolf.stackexchange.com/users/82619/delfad0r?tab=profile) (taking inputs as a list, using abusing that we don't need to deduplicate -> n can always be in *[0,4]* & using a clever combination of input-format and `ap`)!
```
filter((==1e4).sum).mapM([read.(take n<>(c:).drop n)|c<-['0'..'9'],n<-[0..4]]<*>)
```
[Try it online!](https://tio.run/##TVBBbtswELzrFQOhgKTEImIpsWVD8iUF2kN6ylElAlpa2UIoUiCpugH69rrrnEoSuzPAzmCHZ@XfSevrOM3WBXxVQYmX0Qd8nhRmOSID8hzW6A8Yop56DNaB@zLrsVNhtCb6X/9K03hydplZn9aHjA1YPxpWX8jhFznPEg874Nv3Z4Tz6MHP2MATHXmv3EcUsYR@q2nWhE5pvceAto235TaWK7TxpqhiKWU0oMHP6zDqQC5Nm2ZNj5nwy5SJSc0/0taR6kUa1DvB1Ie022eid3aGyf50dd4mD4kQyS6RK8PsQYhHKeu7Q3adFC/c4GbyhnRewmtwLwYCJ8vlYl3vMwZ6NOTR1DVOFJ6tCWSCx@VMjiLcZlu1Oko2Uri/R8J3j@MNxsgPXBj5s70gvX30l8@MSq7ao5TZlbOCY0a7dVGg4l6U2BbRblehjMpNiU1ZREVVYbteM39i/vS3G7Q6@WvezfM/ "Haskell – Try It Online")
[Answer]
# [R](https://www.r-project.org/), 96 bytes
```
function(a,b)(w<-grep(gsub("",".?",a?b),1:1e4?9999:0)?r<-1e4-w)[w+a<2&r+b<2]
"?"=paste
"+"=adist
```
[Try it online!](https://tio.run/##JcrJDoMgFAXQPV9BWDQQsWFwwmD4kKYLaK26scYhfj592Lc69963xhHbPH6O@bVP35l6Hhg9bT6s/UKH7QiUEE7ujnDvAuOylX3hDFwrmFttDjE/2ePMvFW3NQtWPRFxpFv8tveIZKTz72nbIxqpEYJjKRgCSyBkcBqU5rhWDFgr6JW@foxpONaphRlCktEFx1VZJKsG9lrK66Mqodfl3zpZsfgD "R – Try It Online")
## Explanation (ungolfed)
```
function(a,b){
    # Regex inserting ".*": (998,3) => ".?9.?9.?8.? .?3.?"
  regex <- gsub("",".?",paste(a,b)) 
    # Positions matching in the whole vector of strings that add to 10K ("1 9999", "2 9998", "3 9997", "4 9996", ...)
  w <- grep(regex,paste(1:1e4,9999:0)) 
    # 10K minus these matching positions
  r <- 1e4-w 
    # Form position-string vector of ('pos1 10K-pos1', 'pos2 10K-pos2', ...)
  paste(w,r)[
  # Filter only those positions where the edit distance between the matched numbers and the originals are less than 2
    adist(w,a)<2 & adist(r,b)<2 
  ]
}
```
We assign `?` to `paste`. That lets us do something cool: `a<-b?c<-d` does inline assignments within the `paste` call, which we couldn't do with any other operator than `?`, since it has [lower precedence](https://stat.ethz.ch/R-manual/R-devel/library/base/html/Syntax.html) than `<-`.
Now as @JoKing kindly pointed out, there can be cases like `900 10` where two insertions could take place such as `9100 8100`. So we filter out matches where the number of characters in either number has increased by more than 1. The quick way to do this is with the [Levenshtein edit distance](https://en.wikipedia.org/wiki/Levenshtein_distance) `adist` which we bind to `+`. 
[Answer]
# Pyth, ~~28~~ ~~27~~ ~~25~~ ~~24~~ ~~22~~ 20 bytes
```
fq^;4sT*FmvsmXLkdThl
```
Try it online [here](https://pyth.herokuapp.com/?code=fq%5E%3B4sT%2AFmvsmXLkdThl&input=%5B%22998%22%2C%20%223%22%5D&debug=0), or verify all the test cases [here](https://pyth.herokuapp.com/?code=%7Bfq%5E%3B4sT%2aFmvsmXLkdThl&test_suite=1&test_suite_input=%5B%22934%22%2C+%22654%22%5D%0A%5B%22737%22%2C+%22628%22%5D%0A%5B%229122%22%2C+%2288%22%5D%0A%5B%22923%22%2C+%2272%22%5D%0A%5B%22998%22%2C+%223%22%5D%0A%5B%22363%22%2C+%22632%22%5D%0A%5B%22288%22%2C+%22711%22%5D%0A%5B%22365%22%2C+%22635%22%5D&debug=0) - the test suite deduplicates the result by prepending a `{`.
Input is as a list of strings.
```
fq^;4sT*FmvsmXLkdThldQ   Implicit: Q=eval(input()), T=10
                         Trailing d, Q inferred
         m           Q   Map each input string, as d, using:
                   ld      Take the length of d
            m     h        Map 0 to the above (inclusive), as k, using:
             X  d            Insert into d...
               k             ... at position k...
              L  T           ... each number [0-9]
           s               Flatten the result
          v                Convert each back to an integer
       *F                Take the cartesian product of the result
                         (this generates all possible pairs of mutated numbers)
f                        Keep the pairs, as T, where...
     sT                  ... the sum of the pair...
 q                       ... is equal to...
  ^;4                    ... 10,000 (; == 10 here, so this is 10^4)
```
*Edit 4: Saved another 2 bytes, thanks to Mr Xcoder - `v` vectorises by default, and `L` uses `m` underneath, so mapping over range is implied, making the `U` unneccesary too*
*Edit 3: Introduced to global use of `;` operator to retain access to 10 to save 2 bytes, thanks to FryAmTheEggman and issacg:*
```
fq^T4sT*FmvMsmXLkdUThl
```
*Edit 2: I forgot the sum operator exists, how embarassing...*
*Edit 1: Previous version accepted a list of integers as input, performing string conversions manually, for 27 bytes:*
```
fq10000+FT*FmvMsmXLk`dUThl`
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 64 bytes
```
->\a{grep {all (a Z~$_)X~~/^(.*)(.*)$0.?$1$/},(^1e4 Z(1e4...1))}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtf1y4msTq9KLVAoToxJ0dBI1Ehqk4lXjOirk4/TkNPSxOEVQz07FUMVfRrdTTiDFNNFKI0gKSenp6hpmbt/@LESoU0jWhLYxMdBTNTk1hN6/8A "Perl 6 – Try It Online")
This is a port of [G B's answer](https://codegolf.stackexchange.com/a/173097/76162) using a regex to check if the numbers are valid. Thanks to **nwellnhof** for porting it.
## Old answer, ~~127 110~~, 88 bytes
*-22 bytes thanks to nwellnhof!*
```
->\a{grep {all ~<<a Z∈.map:{.comb.combinations(.comb-1..*)>>.join}},(^1e4 Z(1e4...1))}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPtf1y4msTq9KLVAoToxJ0ehzsYmUSHqUUeHXm5igVW1XnJ@bhKYyMxLLMnMzyvWAPN0DfX0tDTt7PSy8jPzamt1NOIMU00UojSApJ6enqGmZu3/4sRKhTSNaEtjEx0FM1OTWE3r/wA "Perl 6 – Try It Online")
Anonymous code block that takes in a list of two numbers and returns a list of pairs of numbers.
Rather than fiddle about with inserting the digits in, this solution checks every combination of numbers that sum to 10000 and filters that the given numbers are part of the pair.
### Explanation:
```
->\a{  # Anonymous code block that takes an argument a
     grep ... ,(^1e4 Z(1e4...1))    # Filter from all pairs that add to 10000
         {      ~<<a     # Stringify the contents of a
                     .map:{      # Map the pair to
                           .comb  # The digits of the number
                           .combinations(.comb-1..*)  # The combinations of the digits
                           >>.join  # Each combination joined
                           # Note that combinations preserve order
                           # "123" -> (12,13,123)
                          }
          all       Z∈   # Zip that each element of a is an element of the combination
         }
}
```
[Answer]
# [R](https://www.r-project.org/), ~~179 161 150~~ 144 bytes
```
function(a,b,w=g(a),r=rep(g(b),e=1e4))paste(w,r)[w+r==1e4]
g=function(x,n=sum(x|1)){for(i in 0:n)for(j in 0:9)F=c(F,append(x,j,i)%*%10^(n:0));F}
```
[Try it online!](https://tio.run/##TY7LasMwEEX3/orpIjDTTsCqkzaPauufCCnIsuwoNIpQ/Aik@XZXdkPp7t7DvXDCUMHHfKhapxt7dqi44F7WqIiDDMZjjQWxkcIsiLy6NAZ7DrTrX4Ic4T6p5d/5yk5e2hNevwXRrToHtGAdpBtHYzn@ljXlUmPOynvjyng6sqXZ80ykn@g2KdE2vw@HaAX/rKAguEE30VGSttDtnsrWf1mtGlNiR3u4J8kBNa454wUxaHzjZUw00Vde8Wqi7yxYPGjGcfPYZjHR8AM "R – Try It Online")
35 bytes saved by @JayCe and @Giuseppe.
### Explanation
Helper function g gets all possible insertions.
```
g <- function(x,            # Input vector of digits
              n=sum(x|1)    # Length of x
              ) {
  for(i in 0:n)             # i is the insertion point
    for(j in 0:9)           # j is a digit from 0 to 9
      # Dot product of vector of digits with insert and 10^(n:0) performs the
      # conversion to integer (and gets rid of the leading 0s)
      F=c(F,append(x,j,i)%*%10^(n:0))  # F is a non-reserved built-in alias to FALSE (numerically 0)
  F
}
```
Main function.
```
f <- 
function(a,                 # Input vectors of digits
         b,
         w=g(a),            # Get all possible insertions for a
         r=rep(g(b),e=1e4)  # Insertions for b replicated 1e4 times each
         )
  paste(w,r)[w+r==1e4]      # paste and w+r recycle w to match length of r
                            # Lots of duplication!
```
I've noticed after the fact that this is essentially the same logic as the [Pyth](https://codegolf.stackexchange.com/a/172987/79980) answer.
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~93~~ 91 bytes
```
->a,b{(1..r=10000).map{|x|/^(.*)(.*:)\1.?\2(.*)(.*):\3.?\4$/=~[a,x,b,y=r-x]*?:&&[x,y]}-[p]}
```
[Try it online!](https://tio.run/##LcfRCsIgGIbh866igxhz/Dp11pZguxA10IOdBSIEyrZu3aT2wQfvE98@l0UV/HDg15YREhWjdYi8XFi3tPXPlnSoXiLDyGz4QSTNUCkuvfpoBwk8ZBVxst0sm0YnyHbHOti9hPOi73yAkdvTrwcBt6s4QCkw@m8@TTAyZssX "Ruby – Try It Online")
Try every single number up to 10000, and use the regex to check if the numbers match.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 30 bytes
```
DµJṬ€k€jþ9Ż¤;9R¤;€$ḌF)ŒpS=ȷ4ƊƇ
```
[Try it online!](https://tio.run/##y0rNyan8/9/l0FavhzvXPGpakw3EWYf3WR7dfWiJtWUQkAAKqDzc0eOmeXRSQbDtie0mx7qOtf///9/c2FzHzMgCAA "Jelly – Try It Online")
Kind of clumsy because Jelly has no insertion.
# Explanation
```
                                   Given [a, b].
Dµ                   )             Get [digits(a), digits(b)] then map:
  JṬ€k€jþ9Ż¤;9R¤;€$ḌF                Generate all the insertions.
                      Œp           Cartesian product: get all pairs.
                        S=ȷ4ƊƇ     Filter for: sum equal to ȷ4 (10000).
                       Given e.g. [6,3,5]:
J                      Get [1,2,3].
 Ṭ€                    Get [[1], [0,1], [0,0,1]].
   k€                  Split input with these: gets us
                         [[6],[3,5]] , [[6,3],[5]] , [[6,3,5],[]]
     jþ9Ż¤             Join table-wise with [0..9]
                         → [[[6,0,3,5], [6,3,0,5], [6,3,5,0]],
                            [[6,1,3,5], [6,3,1,6], [6,3,5,1]], …]
          ;9R¤;€$      Append the prefixings of the input by [1..9].
                           [[1,6,3,5], [2,6,3,5], [3,6,3,5]]…
                 ḌF    Undigits all, and flatten.
```
[Answer]
# Python 3, ~~165 160 153 125~~ 117 bytes
* Saved 5 bytes thanks to @JackBrounstein suggestion to remove `set` from the return value, as the output can contain duplicates.
* Saved 7 by replacing `range(len(s))` with `range(5)`.
* Saved 23 bytes thanks to @Eric Duminil's suggestion to replace `itertools` with nested list comprehensions (and removing a space).
* Saved 8 thanks to @Jo King's suggestion to replace nested list comprehension with a single loop and modulus operator.
~~Using `itertools` and a simple helper function.~~ Accepts strings as input, returns a set of ints as output.
```
c=lambda s:[int(s[:i%5]+str(i//5)+s[i%5:])for i in range(50)]
lambda a,b:{(i,j)for i in c(a)for j in c(b)if i+j==1e4}
```
[Answer]
# PHP, ~~162~~ 159 bytes
lovely example for a generator function!
```
function f($n){for($n+=.1;$n>=1;$n/=10)for($d=-1;$d++<9;)yield strtr($n,".",$d)/10|0;}foreach(f($argv[1])as$x)foreach(f($argv[2])as$y)$x+$y-1e4||print"$x+$y\n";
```
takes input from command line arguments; prints duplicates. Run with `-nr '<code>` or [try it online](http://sandbox.onlinephpfunctions.com/code/0f1dd364e7171aa81b9c1d0c87dabe2c7d2f96a1).
[Answer]
# Pyth, 18 bytes
```
fqsT^;4*FsMvXLRRTT
```
[Demonstration](http://pyth.herokuapp.com/?code=fqsT%5E%3B4%2aFsMvXLRRTT&input=%22934%22%2C%22654%22&test_suite_input=%5B%22934%22%2C+%22654%22%5D%0A%5B%22737%22%2C+%22628%22%5D%0A%5B%229122%22%2C+%2288%22%5D%0A%5B%22923%22%2C+%2272%22%5D%0A%5B%22998%22%2C+%223%22%5D%0A%5B%22900%22%2C%2210%22%5D%0A%5B%22363%22%2C+%22632%22%5D%0A%5B%22288%22%2C+%22711%22%5D%0A%5B%22365%22%2C+%22635%22%5D&debug=0), [test suite](http://pyth.herokuapp.com/?code=%7BfqsT%5E%3B4%2aFsMvXLRRTT&input=%22934%22%2C%22654%22&test_suite=1&test_suite_input=%5B%22934%22%2C+%22654%22%5D%0A%5B%22737%22%2C+%22628%22%5D%0A%5B%229122%22%2C+%2288%22%5D%0A%5B%22923%22%2C+%2272%22%5D%0A%5B%22998%22%2C+%223%22%5D%0A%5B%22900%22%2C%2210%22%5D%0A%5B%22363%22%2C+%22632%22%5D%0A%5B%22288%22%2C+%22711%22%5D%0A%5B%22365%22%2C+%22635%22%5D&debug=0) (test suite is deduplicated with leading `{`).
The input is in the form of a list of two strings.
`XLRRTT`: L and R perform nested maps. Since there are 3 of them, we will perform a triply nested map of the `X` function. In this case, the `X` function will insert a character at a designated position into a string.
The string is the input, which is implicit and placed by the first `R`. The character ranges over `0 ... 9`, so we have all possible inserted digits, and is placed by the `L`. The range is given by `T`, which is implicitly set to `10`, which is implicitly treated as `[0 ... 9]`. The position ranges over `0 ... 9`, which is sufficient, because inserting a number after the 10th position will never be useful. Duplicate results are fine. The range is placed by the second `R`, and given by the second `T`.
`v`: Nested cast strings to ints.
`sM`: Flatten the second level of lists, leaving us with a list of all possible numbers after digit insertion, for each of the input numbers.
`*F`: Take the Cartesian product of the two lists of possible numbers.
`fqsT^;4`: Filter on the pairs whose product is `10000`. `;` takes the value of `10` here, as `T` is in use as the filter variable, and `;` always as the value of the variable which is in use.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~30~~ ~~29~~ ~~25~~ 23 bytes
Takes input as an array of strings, outputs an array of arrays of strings.
```
£L²ôs f_à øX
rï k@L²aXx
```
[Try it](https://ethproductions.github.io/japt/?v=1.4.6&code=o0yy9HMgZl/gIPhYCnLvIGtATLJhWHg=&input=WyI5MjMiLCI3MiJdCi1R)
---
## Explanation
```
£L²ôs f_à øX
£                :Map each X
 L               :  100
  ²              :  Squared
   ô             :  Range [0,L²]
    s            :  Convert each to a string
      f_         :  Remove elements that return false
        à        :    All combinations of current element
          øX     :    Contains X?
rï k@L²aXx
r                :Reduce by
 ï               : Cartesian product
   k@            :Remove each X that returns true (not 0)
     L²          :  100 squared
      a          :  Absolute difference with
        Xx       :   X reduced by addition
      
```
[Answer]
# Javascript (Node) - 183 136 123 Bytes
**123 Bytes thanks to Shaggy**
```
a=>b=>(o={},g=(s,h)=>[...s+0].map((y,x)=>{for(y=10;y--;)h(s.slice(0,x)+y+s.slice(x))}))(a,x=>g(b,y=>1e4-x-y?0:o[+x]=+y))&&o
```
**136 Bytes thanks to Arnauld**
```
e=(h,c,i=h.length+1,j)=>{for(;i--;)for(j=10;j--;)c(h.slice(0,i)+j+h.slice(i))}
f=(a,b,c=[])=>e(a,n=>e(b,m=>1E4-n-m||c.push([+n,+m])))||c
```
**Old Code**
Not proud of it, but figured I'd submit anyways. Creates a string prototype function akin to map which takes up the bulk of the bytes. Function just iterates through both permutations, and finds when 1000-a-b is 0. Takes input as strings.
```
String.prototype.e=function(c){let h=this,L=h.length,i,j;for(i=0;i<=L;i++)for(j=0;j<=9;j++)c(h.slice(0,i)+j+h.slice(i,L));}
f=(a,b,c=[])=>a.e(n=>b.e(m=>1E4-n-m?c:c.push([+n,+m])))?c:c
```
[Try it online!](https://tio.run/##bcyxboMwEIDhPU8RebJlYwVDIZSYTt3YOkYZwDHYlrEROJWqqs9OIVKXiul0/6c703w2s5j0GKK2aaWNnL/LZfkIk3Y9HScffPgaJZW8ezgRtHdQoG8rw1HxoPRMaq6ola4Pimhiys5PUPNTqS@8LjXGaAtmDebCi9KsQUBFZ6uFhCeiETb4b9WkRqj8OXQcNqQlgl9viFcNldDxql3HwKv4PY1cNLyJV0HHx6zgFTuChxtCaGuL8G72VlLre9hBUCQpICB7ScH6@fAP8yQH5Agydt7TImZs4/O@smTDnO1hkj0xS3aVrR@30zh@6vIL)
**Ungolfed**
```
String.prototype.e=function(c) {
  let h=this,L=h.length,i,j;
  for(i=0;i<=L;i++)
    for(j=0;j<=9;j++)
      c(h.slice(0,i)+j+h.slice(i,L));
}
f=(a, b, c=[]) =>
  a.e(n =>
    b.e(m =>
      1E4-n-m ? c : c.push([+n,+m])
    )
  ) ? c : c
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 23 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
œcL’$$€ċ"⁹o⁼"Ạ
ȷ4ḶṚĖDçƇ
```
A monadic link accepting a list of lists of digits  
(e.g. for the example of 923 and 72 the input is `[[9,2,3],[7,2]]`)
**[Try it online!](https://tio.run/##AUIAvf9qZWxsef//xZNjTOKAmSQk4oKsxIsi4oG5b@KBvCLhuqAKyLc04bi24bmaxJZEw6fGh/9Ew4fhuIz//zkyMywgNzI "Jelly – Try It Online")** (footer makes it so I/O is a pair of two integers in and a [formatted] list of pairs of integers out)
Or see the [test-suite](https://tio.run/##y0rNyan8///o5GSfRw0zVVQeNa050q30qHFn/qPGPUoPdy3gOrHd5OGObQ93zjoyzeXw8mPt/4/ucTnc/nBHz7EuoOKjkx7unAGkgSgLRDXMUdC1U3jUMDfrUeO@Q9sObfv/Pzra0thER8HM1CSWSyfa3NgcyDayALEtDY2MdBQsIGwjYx0FcyMw09JCR8EYxDI2AwqaGYNFjSyAouaGhhBxU5C4aWwsAA "Jelly – Try It Online").
### How?
Checks all the pairs of "numbers" (lists of digits) which sum to 10000 for validity by forming all ways to choose n-1 digits from those "numbers" maintaining order; and keeps those which are valid (where validity also allows for the "number" under test to be equal to the original "number").
```
œcL’$$€ċ"⁹o⁼"Ạ - Link 1, is piar valid?: pairToCheck, originalInputPair
      €        - for each list of digits in pairToCheck: e.g. [9,2,3]
     $         -   last two links as a monad:
    $          -     last two links as a monad:
  L            -       length                                 3
   ’           -       decremented                            2
œc             -     choices of that many items               [[9,2],[9,3],[2,3]]
         ⁹     - chain's right argument (originalInputPair)
        "      - zip with: (i.e. apply the following f(x,y) *respectively* across the results above and the originalInputPair)
       ċ       -   count occurrences
            "  - zip with (this time with an implicit right argument of originalInputPair)
           ⁼   -   equal (non-vectorising version)
          o    - locgical OR (vectorising version) i.e. we now have: [OR(isOneDigitLonger(item1),isEqual(item1)), OR(isOneDigitLonger(item2),isEqual(item2))]
             Ạ - all?
ȷ4ḶṚĖDçƇ - Main Link: list (pair) of lists of digits
ȷ4       - literal 10^4 -> 10000
  Ḷ      - lowered range -> [0,1,2,...,9998,9999]
   Ṛ     - reversed -> [9999,9998,...,2,1,0]
    Ė    - enumerate -> [[1,9999],[2,9998],...,[9998,2],[9999,1],[10000,0]] (N.B. last is redundant, but this does not matter)
     D   - to decimals -> [[[1],[9,9,9,9]],[[2],[9,9,9,8]],...,[[9,9,9,8],[2]],[[9,9,9,9],[1]],[[1,0,0,0,0],[0]]]
       Ƈ - filter keep those for which this is truthy:
      ç  -   call last link as a dyad (with a right argument of the pair of lists of digits)
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 24 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
⌐çΘ♠╖øû°-h∟ñµ%üw▲∞Ç╫[½π=
```
[Run and debug it](https://staxlang.xyz/#p=a987e906b70096f82d681ca4e62581771eec80d75babe33d&i=[%22934%22,+%22654%22]%0A[%22737%22,+%22628%22]%0A[%229122%22,+%2288%22]%0A[%22923%22,+%2272%22]%0A[%22998%22,+%223%22]%0A[%22363%22,+%22632%22]%0A[%22288%22,+%22711%22]%0A[%22365%22,+%22635%22]&a=1&m=2)
Those program takes its two inputs as an array of strings, like this.
```
["934", "654"]
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 33 bytes
```
ΦＥ×χφＩ⟦ι⁻×χφι⟧⌊Ｅι№Ｅ⊕ＬλΦλ⁻ξρ§⟦θη⟧μ
```
[Try it online!](https://tio.run/##ZY0xC8IwEIV3f0XGC0RI6yDiJIVCwYKDW@kQ0sMcJKmmqfTfx6bo5G2P773vtFFBj8qmdAvkI9RkIwZo1RPu5HCCQgpWSCm5YJWaInQkWEt@nv458Z7zjZKb3eZYy9U4r94cGq8DOvQRB7iif0QDNg@@P@1PvAgWeAaX2PgBF@hegpleMMfznVM6lYfdsUz7t/0A "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
   χ                                10
    φ                               1000
  ×                                 Multiply
 Ｅ                                  Map over implicit range
       ι    ι                       Current value
        ⁻×χφ                        Subtract from 10000
      ⟦      ⟧                      Pair of values
     Ｉ                              Cast to string
Φ                                   Filter
                ι                   Current pair
               Ｅ                    Map
                     λ              Current value
                    Ｌ               Length
                   ⊕                Increment
                  Ｅ                 Map over implicit range
                       λ            Current value
                      Φ             Filter over characters
                         ξ          Range value
                          ρ         Character index
                        ⁻           Subtract
                            ⟦θη⟧    Original inputs as a list
                                μ   Index of current value
                           §        Get input at that index
                 №                  Count matching values
              ⌊                     Minimum
                                    Implicitly print each pair double-spaced
```
In case you didn't understand that, it runs through all the pairs of values that add to 10000 (as strings), then counts how many times each input matches against the result of deleting up to 1 character from the respective value. If the minimum count is nonzero then both inputs matched and this is a possible solution.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 110 bytes
Accepts strings as input, returns an array of array of integers.
Based on the [python](https://codegolf.stackexchange.com/a/173002/65905) version. For a given integer, `C` creates an array of numbers that can be created by adding a digit.
The lambda iterates over every possible pair and selects the one whose sum is 10000.
```
C=->n{(0..49).map{|i|([n[0...i%5],i/5,n[i%5..-1]]*'').to_i}}
->(a,b){C[a].product(C[b]).select{|i,j|i+j==1e4}}
```
[Try it online!](https://tio.run/##VcoxDoIwGEDh3VOwmLZaflstCkNZOEbTGEBISrQgwmCgZ68QXdxevrx@LN6@lj5McU4LMmUq19D17W0sB5ypQhN4VfeqHKbZ0GY2@0ZKXgnnNpkMUzthBiASAo@8W44ZK6sWAbONNDWHiFq1JEDItd4hRGBor8Y53wW1QslJIBqgcySQhtGa5@bLjK3M2Z8e43jVC@c/9h8 "Ruby – Try It Online")
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/wiki/Commands), 36 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
0ìε.œʒg3‹}εU9ÝεXDgiìësý}}}˜}`âʒOT4mQ
```
Can without a doubt be golfed substantially.. Especially inserting the digits, including a leading/trailing one.
[Try it online](https://tio.run/##AUoAtf8wNWFiMWX//zDDrM61LsWTypJnM@KAuX3OtVU5w53OtVhEZ2nDrMOrc8O9fX19y5x9YMOiypJPVDRtUf99w6r/WzI4OCwgNzExXQ) or [verify all test cases](https://tio.run/##MzBNTDJM/V9Waa@k8KhtkoKSfeV/g8Nrzm3VOzr51KR040cNO2vPbQ21PDz33NYIl/TMw2sOry4@vLe2tvb0nNqEw4tOTfIPMckN/F97eJXOoW32/6OjLY1NdMxMTWJ1FKLNjc11zIwsQExLQyMjHQsI08hYx9wIzLK00DEGMwwMdAwNQCxjM2MdM2OwrJGFhY65oSFE1BQoahobCwA) (`ê` in the footer is to Uniquify & Sort).
**Explanation:**
```
0ì                            # Prepend a 0 before each of the input numbers
  ε                        }  # Map each to:
   .œ                         #  Take all possible partitions
     ʒg3‹}                    #  Only keep those of length 1 or 2
          ε              }    #  Map each partition to:
           U                  #   Pop and store the partition in variable `X`
            9Ý                #   List in the range [0, 9]
              ε         }     #   Map each of those digits to:
               X              #    Get the variable `X`
                Dgi           #    If it's a single number (length == 1):
                   ì          #     Prepend `X` before this digit
                  ë           #    Else (length == 2):
                   sý         #     Join both numbers in `X` with the current digit
                  }           #    Close the if-else
                          ˜   #   Flatten the list of lists
`                             # Now push both lists to the stack
 â                            # Create all possible pairs (cartesian product)
  ʒ                           # Filter this list of pairs by:
   O                          #  Take the sum of the two numbers
    T4m                       #  Push 10000 (10^4)
       Q                      #  And check if they are equal
```
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), 43 bytes
```
⌐ƛ⟨⟩n£¥Lʀ(x|n¬₀r(¥CC←x nSṀṅIJ));ḣhẊ'∑k2=   
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=%E2%8C%90%C6%9B%E2%9F%A8%E2%9F%A9n%C2%A3%C2%A5L%CA%80%28x%7Cn%C2%AC%E2%82%80r%28%C2%A5CC%E2%86%90x%20nS%E1%B9%80%E1%B9%85IJ%29%29%3B%E1%B8%A3h%E1%BA%8A%27%E2%88%91k2%3D%20%20%20&inputs=%22288%2C711%22&header=&footer=%3BU) Takes input of the form: `"a,b"`
**Explanation:**
```
?⌐ƛ⟨⟩n£¥Lʀ(x|n¬₀r(¥CC←x nSṀṅIJ));ḣhẊ'∑k2= # full program
?⌐                                       # split implicit input on ","
  ƛ⟨⟩n£¥Lʀ(x|n¬₀r(¥CC←x nSṀṅIJ));         # "insert" lambda map over input
                                ḣh       # unlist them
                                  Ẋ      # cartesian product [a,b]*[c,d]=[[a,c],[a,d],[b,c],[b,d]]
                                   '∑k2  # filter lambda, sum of pair == 10000
```
The insert lambda can definitely be improved, but I am having trouble figuring out a way to map it instead of explicitly loop over it.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 25 bytes
```
LŻœṖ€z⁶ZjþØDVẎṢḊ)p/S⁼ȷ4ƊƇ
```
[Try it online!](https://tio.run/##AUIAvf9qZWxsef//TMW7xZPhuZbigqx64oG2WmrDvsOYRFbhuo7huaLhuIopcC9T4oG8yLc0xorGh/9Ew4f//zkyMywgNzI "Jelly – Try It Online")
Not the shortest Jelly solution here but maybe someone can golf this? I am stumped
]