P=32*x

myEquation = P==64

Solve[myEquation, x]

Verify the solution by substituting this solution back into expression P...

P/.x->2

Or, instead of defining these expressions first, just feed the raw equation to Solve...

Solve[32*x==64,x]

Solving a system of equations (and inequalities)

Find two numbers that differ by 2, and whose sum is 14.  Got a mental solution??  Good.

This amounts to solving two equations:

({{({{x-y=2    and    x+y=14}})}})

in two unknowns, x and y.  You give Solve the two equations as a list in curly brackets{...}, and also ask for solutions for two variables (also via a list) like this....

Solve[{x-y==2,x+y==14},{x,y}]

Another syntax, where list items are separated by &&:

Solve[  x-y==2 &&x+y==14,{x ,y}]

With lots of complicated equations, it’s useful to use <return> and <space> (which Mathematica just ignores) to make things more readable.  Mathematica doesn’t evaluate anything until you hit shift-<return>.

Solve[
{
x-y==2,
x+y==14
},{x,y}
]

Solve[Sin[x]==Sqrt[2]/2 ,x]

You know there are actually many more solutions to this equation than just this one.  You can also feed in inequalities as well as equalities which must be satisfied, and this can give you something more comprehensive...

Solve[
{Sin[x]==Sqrt[2]/2 ,
-Pi    <x<   Pi},
x]

The ‘%’ operator refers to the most recent result...

myAnswers=%

You can see that the answers actually form a list.  There’s a syntax to refer to the 1st, or 2nd (etc) element of this list that we can use... for example to get a numerical value for the second answer...

N[myAnswers[[2]]]

But, hey, we can also just let N[] operate on the whole list of answers, and get numerical values for both at the same time...

N[myAnswers]