To claim a foster child, answer that you are the legal parent.
However, if you only had the child for 4 months, you will not be able to claim him, as that probably means some other relative, e.g. the parent. had him for more than half the year making the child his "qualifying child" for tax purposes.