Do you know the formula for the area of a rectangle? What is the area of a rectangle with h=2 and w=4? What about for h=3 and w=5? Try writing the general formula. Hint: it's similar to a square.
Do you know the formula for the perimeter? This one is intuitive. If I asked you to use a tape measure to find the perimeter of a rectangle, which is the distance one takes to walk the edge of the shape, what would you do? You would find the length of each side and add them all up. How can you express that in a formula using h and w? For example, what if h=8 and w=4? What would the perimeter be? Try drawing a picture.
After these two steps, you should have two equations, both involving h and w. Two equations and two variables means you can solve for h and w. That should be your final answer.
Best of luck,