You get the cannon by being tiny on the first castle. When you see the big spiky missile thing there are separating blocks follow the right one and you find a tiny pipe. Go through it. I do not know how to get the other level. Hope it helps.
You have to be tiny to do that. be Careful.