The private exponent is the inverse of e modulo phi.
d is the inverse of e
The private exponent d is chosen so e times d leaves remainder one modulo phi.
edmodϕ=one
Check the product
Here e=3 and d=27, so their product is 81.
3⋅27=81
Modulo phi leaves one
Modulo phi=40, the product leaves remainder 1.
81mod40=1
Summary
The recovered private exponent is d=27.