Based on the layout of variables I can see in your screenshot, I'm going to guess that your data are set up with one column containing pH values from Orana, and one column containing pH values from Riverina. If that's the case, you need to change your tilde (~) to a comma, and identify the variables with the data frame name directly rather than using the data= argument:
t.test(soil$Orana, soil$Riverina)
The construction you used would be the format if you had your data set up with one column indicating the locations of the measurements and one indicating the values, something like this:
| location |
pH |
| Orana |
6.2 |
| Orana |
5.9 |
| Riverina |
7.1 |
| Riverina |
7.3 |
And then you'd use:
t.test(pH ~ location, data=soil)