Assuming you have your boarding pass for the BA flight, you will do the following:
Arrive Terminal 2
Follow signs for connections
Reclear security
Walk to the 300 gates from where the BA flights have been departing (from gate 316 in my recent experiences).
Some important points:
For virtually all arrivals, arrivals and departures are separated (the only exception is the 100 to 100 gates).
DUB has two terminals:
(the new) Terminal 2 has one pier (the 400 gates)
Terminal 1 has three piers (the 100, 200 and aforementioned 300 gates).
The piers are all connected post security (ie you can walk from Terminal 2 to the 300 gates in T1. Indeed, if you have your boarding pass for a T1 you can nevertheless clear security at T2.
From aircraft door to boarding gate in your case should take around 30 minutes max.