You have a mish mash of PHP and vB template script going on there.
Try this..
Code:
<vb:if condition="$catid == 3">
<vb:if condition="$bbuserinfo['usergroupid'] == 9">
<font color="#FFFFFF"><b></a>Buy this item</b></font>
<vb:else />
<font color="#FFFF00"><b></a>Member ONLY sale</b></font>
</vb:if>
<vb:else />
<font color="#FFFFFF"><b></a>Buy this item</b></font>
</vb:if>
And be sure that $catid is being passed to your template in the PHP code for your add-on. If it's not, it won't work.