Investors & landlords

first sell is a profit only if you are doing Last in first out 
in that case second sell of 30 shares  must be presumed to be at 22 not 30 so that would be a loss.
since 15 shares were bought within the wash sale window the loss on 15 of the 30 shares would be disallowed.
however the basis of 15 shares of the first sale at 22 would be adjusted so the loss ends up not disallowed after all.

 

More likely it is FIFO,  and the first sale has a loss out of which  the loss on 15 shares is disallowed. it is a disallowed loss since the second lot was purchased  two days before the sale of half the first lot which is within the wash sale window