SQL server – How to declare a query, select to compare two subquery values

I have these discs

    dTemplate idTeam idProfile NumberCargo
Q2 2 5 contributor
Q4 2 4 Project Manager
Q4 2 5 contributor
Q4 4 7 Project Manager
Q4 4 8 Contributor

idSubject idTeam idProfile NumberCargo
Q2 2 3 Owner's idea
Q4 2 3 Owner's idea
Q2 4 6 Owner's idea
Q4 4 6 Owner's idea

These are work teams that work at the university through the topics. Members must always accompany the "idea of ​​the owner".

In the registers, there are 3 people that I have to withdraw (4-7-8) and keep profile 5 because it is with the owner of the idea in both assignments.

I think for a few days to find the solution and the only way to realize it is to ask if "idProfile" is in the subjects where is "the idea of ​​the owner".

The closest thing to what I want is the next statement, but a variable can not hold two data.

DE SectionEquipement to
O a.idAsignatura =
SELECT b.idAsignatura
DE SectionEquipment b
WHERE b.idProfile = a.idProfile
AND a.idAsignatura =
SELECT c.idAsignatura
OF Section Equipment c
WHERE c.idTeam = a.idEquipment
AND c.NameCargo = "Owner Idea"

What I am saying in the consultation, is that the topics of the profile are the same as those of the "idea owner"

It is easy to propose to COUNT to the "Owner of the idea" and to count the subjects he has, but in general, the students have more subjects.

That someone who gets me out of this mess to continue

NOTE: The section team is a view