How can I search relevant users?


I have the following task:
Authenticate user into the system [done]
When user tries to find his friend using search box (input text), drop down the collection of relevant users.
For example if userA is following to [‘bUser’, ‘bUser2’, ‘bUser3’]
And the twitter has users [‘bonoparte’, ‘bing’, ‘bUser’, ‘bUser2’, ‘bUser3’, etc…]

Then, in case if userA inputs ‘b’ into search box, in drop down should be represented the following collection:
[‘bUser’, ‘bUser2’, ‘bUser3’, ‘bonoparte’, ‘bing’, etc]

Currently when I trigger, I receive the users registered in twitter even if they are not relevant to userA.
Like so - [‘bonoparte’, ‘bing’, ‘bUser’, ‘bUser2’, ‘bUser3’, etc…]

The question is, is it possible to complete the task as required?