Can I merge two drains with traps into one pipe?
Yes, in most every home, multiple P traps eventually go into a single drain. The important considerations are that there is proper slope, there's a vent within a certain distance of the drain (either wet or dry), and that the drains are properly sized. What you can't have is one P trap in line with another (creating an air locked section), but two P traps that connect to a Y and enter the wall should be perfectly fine.