Find out how many rows you have to choose from (SELECT count(*) as range from amazon where cat='$cat'), pick two random numbers $row1 and $row2 between 0 and $range-1 inclusive (make sure they're different, if $row2==$row1, try picking $row2 again), then do two selects:
"select * from amazon where cat='$cat' offset $row1 limit 1"
"select * from amazon where cat='$cat' offset $row2 limit 1"
Better is if your rows have a unique id (which I'll assume is called 'id'). Select all the ids from the table (where cat='$cat'), pick two at random ($id1 and $id2) and then query
"select * from amazon where id=$id1 or id=$id2";
If your DBMS has its own random number generator, it may make more sense to exploit that.