Hi,
You could do this by removing the @prefix@ variable and the space, and changing the @firstname@ variable expression to something like this:
IF(LEN([Prefix]) > 0, [Prefix] & " " & [FirstName], [FirstName])
Which basically translate as "if the length of the Prefix string is more than 0 (not empty), print the prefix, then a space, then the first name. Else, print just the firstname".
Hope this helps,
Eric.