His kids lived with me for several months in 2017 but I am worried about what is going to happen with my benefits. I had to wait a very long time to get on the benefits so I am scared to get kicked off. Any advice/help is appreciated.
If the children did not live in your home for over 6 months then you cannot claim them as dependents on your tax return. They would have to meet all the requirements under the Qualifying Child rules to be dependents.
To be a Qualifying Child -
1. The child must be your son, daughter, stepchild, foster child, brother, sister, half brother, half sister, stepbrother, stepsister, or a descendant of any of them.
2. The child must be (a) under age 19 at the end of the year, (b) under age 24 at the end of the year and a full-time student or (c) any age and permanently and totally disabled.
3. The child must have lived with you for more than half of the year. Temporary absences while away at college are considered living with you.
4. The child must not have provided more than half of his or her own support for the year.
5. If the child meets the rules to be a qualifying child of more than one person, you must be the person entitled to claim the child as a qualifying child.
6. The child must be a U.S. citizen or U.S., Canada or Mexico resident for some portion of the year.
7. The child must be younger than you unless disabled.
This essentially means that you have the parent’s permission to claim the child, if the child also lived with the parent more than half the year.
There's actually two more rules:
8. If the parents of a child can claim the child as a qualifying child but no parent so claims the child, no one else can claim the child as a qualifying child unless that person's adjusted gross income (AGI) is higher than the highest AGI of any of the child's parents who can claim the child.
9. The "child" must not file a joint return with his spouse.
Note that none of the child dependent rules require that you provided any support to your brother-in-law's (BIL) children. All that is essentially required is that you be related and the children lived with you half the year+. A BIL's children are usually your nieces and nephews, even if they are only step nephews, so they are related.