Prelude: Ani Maamin is of unknown authorship, and occasionally deviates from the most accurate presentation of the Rambam's principles. In this particular example, Ani Maamin brings a verse that the Rambam himself did not bring as source-text for this principle (however, in the Rambam's discussion of this principle in Moreh Nevochim, 3:17, he does cite this verse as evidence that Hashem investigates all actions of mankind). In any event, R' Moshe Shapiro assumes that the Ani Maamin was written by a person of stature, and it has been incorporated into the liturgy of virtually all Jewish communities, so here is his explanation (R' Moshe Shapiro, found in Re'eh Emunah 10a):
Seemingly, as this verse is not one of the verses that the Rambam brings, it is not being brought as a source but rather as a point of clarification. This verse is also cited in a mishna in Rosh Hashana (1:2):
בראש השנה, כל באי עולם עוברין לפניו כבני מרון, שנאמר "היוצר יחד, ליבם; המבין, אל כל מעשיהם"
On Rosh Hashana, all inhabitants of the world pass before Him like b'nei maron, as it says "Who fashioned the hearts of them all, Who comprehends all their actions"
The gemara (Rosh Hashana 18b) deduces from the addition of this verse that all of humanity is judged with one stroke. This is the judgement which incorporates all of humanity and their actions, though they may be done with free-will, into Hashem's greater plan for existence.
R' Shapiro understands that the point of the 10th principle being emphasized is that Hashem's knowledge accounts for all the actions of man, and man's free will cannot subvert the greater plan that Hashem has for creation. Thus, the Ani Maamin brings this verse as an explanatory note, that Hashem has one master plan which takes into consideration and accounts for the actions of all mankind.
(This is a summarized presentation of R' Shapiro's approach to this principle, in order to focus on the verse of the Ani Maamin. For the full discussion and context, see רעה אמונה p. 241-247)