Two sinks can share a trap as long as the centerline of the outlet (tailpiece) of both sinks is not more than 30-inches horizontally from the trap centerline, per International Plumbing Code (IRC P3201.