I found a formula for calculating the inverse matrix of a Riordan array here: https://arxiv.org/pdf/2101.06713.pdf (section 3 Lemma 7). It says the $n,k$-element of the inverse of $\mathcal{R} \left(g(x), f(x) \right)$ is given by
$$\frac{(-1)^k}{n+1}{n+1 \choose k} [x^n] f(x)^{k} \frac{1}{g(x)^{n+1}}$$
When calculating $\mathcal{R} \left(\frac{1}{1-x}, \frac{x}{1-x}\right)$ it works alright (except is the term $(-1)^k$ wrong, it should be dropped??). We get the Pascal triangle and for the inverse the alternating minus signs: $\mathcal{R} \left(\frac{1}{1-x}, \frac{x}{1-x}\right)$ and its inverse are (begin)
$$ \left(\begin{array}{rrrrrrr} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 0 & 0 & 0 \\ 1 & 3 & 3 & 1 & 0 & 0 & 0 \\ 1 & 4 & 6 & 4 & 1 & 0 & 0 \\ 1 & 5 & 10 & 10 & 5 & 1 & 0 \\ 1 & 6 & 15 & 20 & 15 & 6 & 1 \end{array}\right), \left(\begin{array}{rrrrrrr} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ -1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & -2 & 1 & 0 & 0 & 0 & 0 \\ -1 & 3 & -3 & 1 & 0 & 0 & 0 \\ 1 & -4 & 6 & -4 & 1 & 0 & 0 \\ -1 & 5 & -10 & 10 & -5 & 1 & 0 \\ 1 & -6 & 15 & -20 & 15 & -6 & 1 \end{array}\right). $$
But then I tried the example $\mathcal{R} \left(\frac{1}{1-x}, \frac{x}{(1-x)^2}\right)$. I'm getting the inverse element
$$\frac{1}{n+1}{n+1 \choose k} [x^{n-k}] (1-x)^{-2k+n+1} = \frac{1}{n+1}{n+1 \choose k} {n-2k+1 \choose n-k}(-1)^{n-k}$$
but this gives
$$ \left(\begin{array}{rrrrrrr} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ -1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & -1 & 1 & 0 & 0 & 0 & 0 \\ -1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 1 & -1 & 0 & 2 & 1 & 0 & 0 \\ -1 & 1 & 0 & 0 & 5 & 1 & 0 \\ 1 & -1 & 0 & 0 & 5 & 9 & 1 \end{array}\right) $$
whereas the it should be
$$ \left(\begin{array}{rrrrrrr} 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ -1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 2 & -3 & 1 & 0 & 0 & 0 & 0 \\ -5 & 9 & -5 & 1 & 0 & 0 & 0 \\ 14 & -28 & 20 & -7 & 1 & 0 & 0 \\ -42 & 90 & -75 & 35 & -9 & 1 & 0 \\ 132 & -297 & 275 & -154 & 54 & -11 & 1 \end{array}\right) $$
I'm using this Sage-code for check:
#from https://ask.sagemath.org/question/26573/how-to-compute-riordan-arrays/
def riordan_array(d, h, n, exp=false):
def taylor_list(f,n):
t = SR(f).taylor(x, 0, n-1).list()
return t + [0]*(n - len(t))
td = taylor_list(d, n)
th = taylor_list(h, n)
M = matrix(QQ, n, n)
for k in (0..n-1): M[k, 0] = td[k]
for k in (1..n-1):
for m in (k..n-1):
M[m, k] = add(M[j, k-1]*th[m-j] for j in (k-1..m-1))
if exp:
u = 1
for k in (1..n-1):
u *= k
for m in (0..k):
j = u if m == 0 else j/m
M[k,m] *= j
return M
n = 7
show(riordan_array(1/(1-x), x/(1-x)**2, n)^(-1))
show(matrix([[ 1/(a+1)*binomial(a+1,b)*(-1)**(a-b)*binomial(a-2*b+1,a-b) for b in range(n)] for a in range(n)]))