@sabya33 ,
(a) to be able to claim Foreign Earned income exclusion, you need to meet the following:
1. Foreign tax home ;
2. Tax payer must be US person ( citizen/ GreenCard/ Resident for Tax purposes )
2. Pass the Physical Presence test ( 330 days abroad in any consecutive 12 month test period ) where the current tax year or part thereof must either ends or starts.
3. The tax filing cannot be done till after the physical presence test has be satisfied..
The requirements are the same for a taxpayer whom is approved to use the Bonafide Resident test -- no 330 out of 365/366 days abroad test requirement.
Section 911 of Internal Revenue code allows exclusion only for qualified individual whom is defined as follows :
(1)Qualified individualThe term “qualified individual” means an individual whose tax home is in a foreign country and who is—
(A)
a citizen of the United States and establishes to the satisfaction of the Secretary that he has been a bona fide resident of a foreign country or countries for an uninterrupted period which includes an entire taxable year, or
(B)
a citizen or resident of the United States and who, during any period of 12 consecutive months, is present in a foreign country or countries during at least 330 full days in such period.
My interpretation of this is that your qualified person (citizen/resident status ) & foreign tax home status both must satisfied during the 12 month test period. In your case you are trying to exclude the October- December of 2022 where in you could be a resident ( may be ) for those three months but your 12 month test period would have to be Sep/October through the next 12 months ( when you are not a resident for most of the period. This because your J-1 visa is generally assumed to be terminated either because of lapse of residency in the USA and/or non-employment by the original sponsor for your visa. I say this because J visa is always associated with employment / training by an institution.
Bottom line is I do not believe you can sustain a challenge by the IRS for exclusion of your earnings post your departure from the USA.
It is simpler to file 2022 as a dual status ( thus excluding your Indian earnings from US taxes ) but of course this means that you have to use itemized deduction and not standard deduction.
The other issue here is that you will have a hard time showing closer connection to the USA in order to prove that you were still a resident ( banking, housing, significant assets , family connections etc etc. )
Beyond this I don't know how to help you .
pk