I have this EPW assigment and I don't understand it.

A rat is put into a square maze that has a feeding station at one corner. The rat can move along corridors to the feeding area. The corridors are represented by the horizontal and vertical lines.

The rat may only travel upward and to the right toward the feeding station. How many different routes can the rat travel to get to the feeding station from corner A?

My teacher says there is some sort of formula to get the answer but I looked through my book and found nothing.

that's the maze.

my friend came up with this, is it correct?