Problem with recursion, the function is called infinite times

one more help here’s the link