A faster way to combine two SQL table
Assuming that each post has exactly one submitter, this is a more natural formulation of the query.

SELECT posts.*
     , users.username
     , users.firstname
     , users.lastname
     , users.avatar
    FROM posts
        JOIN users
            ON posts.submitter = users.username
    WHERE
        posts.id &lt; $lastpost
        AND posts.position = posts.submitter
    ORDER BY posts.id DESC 
    LIMIT 5


However, its performance is likely to be similar to your original query.  To investigate performance issues, run EXPLAIN SELECT to help you verify that the necessary indexes are in place.