Without seeing your code, it is difficult to tell what you are doing wrong.
However, with regard to creating multiple levels of items.....
It isn't necessarily easy, if you have never done it before but it is quite simplistic and doesn't require a lot of thought.
Remember that all tags have to be ended (in theory) so, if you have a <fred> tag you will inevitably have a </fred> tag somewhere to end it. However, some people are really smart and realise that you can end the tag within itself. So, you can say <fred />, which starts and ends the fred tag. The most common one you will see is the break tag which is almost always written as <br />.
If you weren't aware of that, it may be that which is throwing you.
Each menu item is represented by the <item> tag but a) it may have some qualifiers on it (i.e. <item ....... >) and b) it may be terminated within itself (i.e. <item ....... />) if, typically, it is in the last level of a flyout.
That is what is happening here.
So, a single menu item (with no other levels) is probably written as
<item ....... />
whereas multiple levels (in this case two) will be written as
<item ....... >
<item ...... />
<item ...... />
</item>
so, within the top level (that ends with the </item> ) there is another level consisting of two items that terminate themselves.
If you wanted to go down to a third level, it could be written as
<item ....... >
<item ...... >
<item ...... />
<item ...... />
</item>
<item ...... />
</item>
The first item has two items within it and the first one of those has two items in it.
My example demonstrates how difficult it is to fathom out what is going on sometimes. Obviously it would be better if the code was indented somehow to emulate the menu structure but, as I am too lazy to figure out how to do it on this forum, so are many coders when it comes to writing their code
The captions and links are pretty straight forward so I hope that helps but, if that isn't your problem then, as I said, it would be necessary to see the code to determine what is wrong.