A man that Marries 3 ladies and each have different kesubos how the divide the estate if there’s not enough,and Shmuel’s Halacha of an investment of two different amounts and splitting the profits