Steps by knight problem

I was trying this problem, named “steps by knight”. It can be done using both DP and BFS. I was able to solve the problem using BFS but failed to solve it using DP recursively. Here is the link to my code. Can someone plz explain to me the problem in my code.

Problem Link -

My DP solution -