Extracting solutions from one equation and placing them as inputs of another equation [closed]

I have a very simple equation 2x + y = 10 I want to know which integer combinations of x and y between -10 & 20 will yield a solution 10. I then want to store the various solutions of x and y and have them as inputs to another equation x^2 + 2y = z and in the end I want a list of all the z values. How do I tell Mathematica to do that?

I tried:

one[x_, y_] = 2 x + y;
Array[{Solve[one[x_, y_] == 3, {20 > x > -10, 20 > y -10}}, [one, 10]]

-

closed as off-topic by belisarius, Kuba, Yves Klett, Artes, Michael E2Nov 27 '13 at 16:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Kuba, Yves Klett
If this question can be reworded to fit the rules in the help center, please edit the question.

You surely should start following some tutorials, try some code, and post it here when you've a problem you can't solve –  belisarius Nov 26 '13 at 23:41
one[x_, y_] = 2 x + y; Array[{Solve[one[x_, y_] == 3, {20 > x > -10, 20 > y -10}}, [one, 10]]' @belisarius –  Randy Nov 27 '13 at 0:06
possible duplicate of How to find lattice points on a line segment? –  Artes Nov 27 '13 at 7:20

Here's another way using FindInstance:
z = (x^2 + 2 y) /.

x^2 + 2 y /.  Solve[{2 x + y == 10 && -10 < x < 20 && -10 < y < 20}, Integers]
`