This has generated no answers, so thought I would put up the answer in case someone looks and wonders later.
Don was on the right track.
In a vacuum, a projectile follows a parabolic path. On the moon, a golf ball hit with a driver will follow a path described by the very top, nearly flat, portion of a very large parabola, while one hit with a loft wedge will follow a much larger portion of a much smaller parabola. The key for this puzzle is that the shape of the downward path is an exact mirror image of the upward path. Thus since the projectile at the mouth of the cannon is moving at 45 degrees from horizontal, it will be at 45 degrees when it gets to the same level at the trampoline.
If the trampoline is tilted at 45 degrees, the cannonball will hit it squarely and follow back along exactly the same path.
The second solution is trickier: If the trampoline is set at 22.5 degrees from horizontal, the cannonball will hit the trampoline at 22.5 degrees from perpendicular, and reflect at 22.5 degrees on the other side or perpendicular, which is vertical. The ball will shoot straight up, then come back down, tracing the path in reverse, eventually back to the mouth of the cannon.