Please approach a class IV student to give you the best answer as already many people ahve mentioned these same lines and note sure if asking pretty simple questions really makes any sense:
nonetheless:
as a general rule get the variables to one side and numerals to another side:
7x = 51 - 9 = 42
:. x = 6
Hope this explanation helps