Re: Displaying user profile
The strategy is this: Create a bp_has_members() loop, passing the user id along in the include
parameter (see https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-members-loop/ for more details about the members loop). Then, inside of that loop, use the member header at buddypress/bp-themes/bp-default/members/single/member-header.php as a template for creating the friend link, message buttons, etc.