Considering you are using MySQL, this query will work and return a "random" first name (it might always return the same for a while, then change after an update / delete / insert into query) :
SELECT FirstName, LastName FROM people GROUP BY LastName
Please note this query will not work on any intelligent RDMBS (i.e. not MySQL). A good way to do this (and actually pick random first names) would be by using analytical functions (PostgreSQL syntax) :
WITH TT AS (
SELECT FirstName, LastName, ROW_NUMBER() OVER(PARTITION BY LastName ORDER BY random()) AS R
FROM people
)
SELECT FirstName, LastName
FROM TT
WHERE R = 1;
Unfortunately for you, MySQL doesn't know CTE and analytical functions and makes it much harder to randomize things like this.