Glad to help and thanks for the feedback!
To confirm your understanding, the formula works in this way:
1) It looks for the "equal or smaller" corresponding "x-value" in the top row (xmatch(…,-1)) and the "equal or larger" corresponding "y-value (xmatch(…,1)). XMATCH returns their indexes/positions in the top row.
2) Then we simply retrieve the corresponding x's (2 values) and y's (2 values) in the array, thanks to INDEX (we use an INDEX/MATCH).
3.1) Then we use LINEST to get the "a" and "b" coefficients, since we calculate the relation between x's and y's as y = a*x+b. And we get a and b with INDEX again.
3.2) Finally the corresponding y value to the given x is calculated with y = a*x+b with x := the input value.