Here is the code in legacy that displays the avatar and the rank. In the default they are separate conditions that are tested and the Avatar is usually first the rank underneath it.
HTML Code:
<if condition="$show['avatar']">
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
To do what you want, you need to combine the two conditions into one. For example:
HTML Code:
<if condition="$show['avatar']">
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a><span class="smallfont">$post[rank] </span>
</div>
</if>
This should display them side by side but you might have to tweak it some.
I haven't tested it because you have the rank images but it should work and it assumes that the rank condition is part of the avatar conditional.