Upvote:3
I have B1-B2 visa and I work in USA on my J1 SSN.
The Social Security Number has nothing to do with your immigration status. Once you have a number, it's yours for life, but the fact that you have a number does not imply that you are authorized to work in the US.
I was getting paid in checks which were taxed properly on my SSN.
The fact that income taxes were withheld also does not mean that everything about your working in the US was legal. It just means that your employer has complied with the laws concerning tax withholding.
Could I have problems on my return to USA in two months? Because technically I shouldn't work on B1-B2 but I didn't have problem finding jobs just with my SSN.
Yes, you could have problems, because, as you note, you are not allowed to work in the US while you are in B-1 or B-2 status. The fact that an employer hired you does not excuse you from the obligation to comply with the conditions of your immigration status.