Assume you have two datasets which elements shape is respectively (bs,d0,d1) and (bs,d0',d1) and you want a new dataset which element shape is (bs,d0+d0',d1) you can do it using tf.Dataset.zip and then concatenating each element on the second axis, like in the example below:
import tensorflow as tf
a = tf.zeros((100,4,8))
b = tf.ones((100,1,8))
d1 = tf.data.Dataset.from_tensor_slices(a)
d1 = d1.batch(16,drop_remainder=True) # elements shape (16,4,8)
d2 = tf.data.Dataset.from_tensor_slices(b)
d2 = d2.batch(16,drop_remainder=True) # elements shape (16,1,8)
d = tf.data.Dataset.zip((d1,d2))
d = d.map(lambda x,y:tf.concat([x,y],axis=-2)) # elements shape (16,4+1,8)
it = iter(d)
x = next(it)
print(x.shape)
print(x)
If you want instead to stack two datasets with the same elements shape (bs,d0,d1) into a new dataset with elements shape (bs,d0,d1,2) you can do it zipping the two datasets and then staking the elements
import tensorflow as tf
a = tf.zeros((100,4,8))
b = tf.ones((100,4,8))
d1 = tf.data.Dataset.from_tensor_slices(a)
d1 = d1.batch(16,drop_remainder=True) # elements shape (16,4,8)
d2 = tf.data.Dataset.from_tensor_slices(b)
d2 = d2.batch(16,drop_remainder=True) # elements shape (16,4,8)
d = tf.data.Dataset.zip((d1,d2))
d = d.map(lambda x,y:tf.stack([x,y],axis=-1)) # elements shape (16,4,8,2)
it = iter(d)
x = next(it)
print(x.shape)
print(x)