Shouldn't be hard to get the y-position of the last created pipe..
Would be easier to explain if we knew your events to create them..
If both pipes are created in the same event, storing the y-position of the first in a local variable and using that to determine the position of the second should work..
That would use a system set variable to family.y after creating, or set the variable to a random number and creating both pipes based on it..