This appears to be a term school project that will require a lot of coding.
Is the Procedure you refer to MazeSetUp or another Procedure you have yet to code?
Note MazeSetUp does not include sequencing, selection (if-statements), and iteration (repeat loops). Do you know how to do those things?
Here is how to use if statements > Programming Your App to Make Decisions. Have you read Creating Animated Apps and Repeating Blocks (about loops) ?
How do you ensure your sprites stay within the boundaries of the maze? You could use the color of the maze barriers to disallow the ball to move outside the maze boundaries while using the accelerometer to move. If Canvas.GetPixelColor = black then stop movement else allow movement.
Here is an algorithm that might be useful to your assignment. Get out of a maze. Code proposal - #3 by Juan_Antonio
Will any of these pieces of information above be useful? I don't know. What you use depends on what you expect the app to do.
Does your code MazeSetup work? Can you use you accelerometer to traverse your ball through the maze yet.