There are simple ways and slightly more complicated (a little more info about what you are trying to accomplish might get you better information).
If you want it to happen when the trap comes in, set up an alert that runs a script that appends it to a text file.
If it's historical info, you could use a SQL query like:
SELECT TOP 1000 *
inner join TrapVarbinds on TrapVarbinds.TrapID = Traps.TrapID
where IPAddress in ('x.x.x.x','y.y.y.y') and OID in ('22.214.171.124.126.96.36.199.0','188.8.131.52.184.108.40.206.4.1.0')
and either copy it to a text file, or run it through a script.