Let molecular weight of A is a gram
let molecular weight of B is b gram

we need to find a:b.

we know that pressure is proportional to the number of moles present.
when pressure was 1 atm, no. of moles = 2/a moles
when pressure was 1.5 atm, no. of moles = (2/a + 3/b) moles

 \frac{1}{1.5}= \frac{ \frac{2}{a} }{\frac{2}{a}+\frac{3}{b}} \\ \\ \frac{2}{3}= \frac{ \frac{2}{a} }{\frac{2b+3a}{ab}}\\ \\ \frac{2}{3}= \frac{ \frac{2}{a}  \times ab}{2b+3a} = \frac{2b}{2b+3a} \\ \\2 \times (2b+3a)=3 \times 2b\\ \\4b+6a=6b\\ \\6a=6b-4b=2b\\\\  \frac{a}{b}= \frac{2}{6}= \frac{1}{3} \\ \\ a:b=1:3
1 5 1