What Kind of Wooden Beam is this
"Landscape Timber" or, sometimes, "used railroad tie" - but "landscape timber" is what you'll find at most typical lumber suppliers. 

They will typically last several years - if well pressure-treated, longer. It's hard to know if they are really well pressure-treated until they start failing and you look at a calendar to figure out how long it's been.

Concrete "fake stone" retaining wall blocks will last longer, generally speaking. So which costs less depends on how long a time you are considering when judging the total cost.

You probably want a geotextile fabric layer between the soil and the gravel to keep the gravel from migrating into the soil over time.