I have a problem shown below that wants to find the quickest way to get between any two points by using only the moves of a knight in chess. My first thought was to us the A* algorithm or Dijkstra's algorithm however, I don't know how to make sure only the moves of a knight are used. I would appreciate it if you could suggest a better algorithm or just some tips to help me. Thank you.

Write a function called answer(src, dest) which takes in two parameters: the source square, on which you start, and the destination square, which is where you need to land to solve the puzzle.  The function should return an integer representing the smallest number of moves it will take for you to travel from the source square to the destination square using a chess knight's moves (that is, two squares in any direction immediately followed by one square perpendicular to that direction, or vice versa, in an "L" shape).  Both the source and destination squares will be an integer between 0 and 63, inclusive, and are numbered like the example chessboard below:


-------------------------
| 0| 1| 2| 3| 4| 5| 6| 7|
-------------------------
| 8| 9|10|11|12|13|14|15|
-------------------------
|16|17|18|19|20|21|22|23|
-------------------------
|24|25|26|27|28|29|30|31|
-------------------------
|32|33|34|35|36|37|38|39|
-------------------------
|40|41|42|43|44|45|46|47|
-------------------------
|48|49|50|51|52|53|54|55|
-------------------------
|56|57|58|59|60|61|62|63|
-------------------------
For this problem, simply doing a breadth-first search is enough (Dijkstra and BFS work in same way for unweighted graphs). To ensure that only the chess knight's moves are used, you'll have to define the moves in a proper way.
Notice that a chess knight moves two squares to any direction, then one square perpendicular to that. This means it can move two squares left of right then one square up or down, or two squares up or down then one square left or right.
The calculation will be much easier if you identify the cells by rows (0 - 7) and columns (0 - 7) instead of 0 - 63. This can be done easily by dividing the cell index by 8 and using the quotient and remainder as row and column indices. So, if the knight is at position (x, y) now, its next possible positions can be any of (x - 2, y - 1), (x - 2, y + 1), (x + 2, y - 1), (x + 2, y + 1), (x - 1, y - 2), (x - 1, y + 2), (x + 1, y - 2), (x + 1, y + 2). Be careful that all of these 8 cells may not be inside the grid, so discard the locations that falls out of the board.
Simple algorithm to move from one tile to another using only a chess knight's moves