Hi Lucinda,
there is no filtering option to directly filter linked items by their type since only codename is stored along with that linked item element value. I would recommend to get all parent items (usually all items of some type - the type that contains that linked item element) and perform filtering on application layer -> iterating through all linked items of retrieved items and if their type is B, then keep the parent item.