Note up-front that allowing PC to ride another PC is already up to DM discretion as to whether the PC (the dragonborn in the case) has the "appropriate anatomy" to be a mount. Playing around with this can allow fun things like your gnome/dragonborn duo but also things like centaur stacks. The rules also clearly are not written to handle mounted stacks. But I will give you first a purely rules-based ruling and then what I consider to be a more reasonable ruling.
First, I will clear up a confusion about the rules that greatly affects the discussion.
Mounted riders can be targeted by OAs provoked by mounts, but do not provoke themselves
There is a clear delineation in the rules between provoking an OA and being the target of an OA. Normally, a creature that provokes the OA is the only available target for an OA. However the mounted combat rules creates an exception to this:
if the mount provokes an opportunity attack while you’re on it, the attacker can target you or the mount.
Note the language used. The mount "provokes" and you can be "targeted". If they intended to say that the rider also provoked OAs then they would have simply said:
if the mount provokes an opportunity attack while you’re on it, you also provoke an opportunity attack.
But they made a decision not to do so, instead just allowing the attack to be directed at mount or rider. So, as written, the rider does not provoke OAs as indicated by the general rule for OAs which is not overridden by any aspect of the above rule:
You also don’t provoke an opportunity attack when you teleport or when
someone or something moves you without using your movement, action, or
reaction.
You can see a direct impact of this ruling here.
RAW is unclear if the gnome can be targeted — DM decision
if the mount provokes an opportunity attack while you’re on it, the attacker can target you or the mount.
The rules create a hierarchy in which a mount has a rider. The rider of the mount can be targeted by opportunity attacks that the mount provokes. However it is not clear whether the gnome would be considered a rider of the horse as well as of the dragonborn or just a rider of the dragonborn. Thus the RAW has two possible interpretations. As a DM, you have to decide how you want to rule it. I will discuss both and outline how they work out.
Option 1: Gnome is a rider of both mounts
if the mount provokes an opportunity attack while you’re on it
This has a bit of very specific support in that it seems that you are considered a rider of a mount if you are "on it". While that is not defined, it is hard to argue that the gnome is not "on" the horse even though they are not directly riding on the saddle.
If you rule this way, then the gnome is a valid target if either the dragonborn or the horse provokes an OA.
However, this ruling is messy and doesn't make a ton of sense intuitively. It also means you have to deal with the fact that the gnome is mounted on two things and any rules that affect mounts or their riders could create complicated interactions.
Option 2: Gnome is a rider of only the dragonborn
In this interpretation, the gnome is considered to be a rider only of the dragonborn and the gnome is not affected by anything that affects the riders of the horse (but not the riders of the dragonborn).
In this case, the gnome is a not a valid target if the horse provokes.
Reasonable ruling: just consider them both mounted only on the horse
The gnome gains no benefit to being mounted on the dragonborn while also being mounted on the horse. All this does is add needless convolution and confusion for no added benefit for anyone. As a DM, a very reasonable ruling that simplifies matters for you is to just consider them both as mounted on the horse while the dragonborn is mounted. That means that (like RAW option #1) the gnome would also be a valid target for OAs that the horse provokes. This makes sense from a narrative perspective and simplifies the rules because you avoid the ambiguities that mount stacking has entirely. As soon as the dragonborn dismounts simply consider the gnome mounted to the dragonborn again.
Considering reach
Of course, being able to be targeted by an attack is still limited by the reach of the attack. It might be worth noting that depending on how and if you track the vertical height of this mounted stack, the gnome might be out of reach for most attacks with a range of 5 feet.