Since the total cost must be $5, the we have the following equation which relates the postacard and first class staps:

where f denotes the number of first class stamps and p the nunber of postcard stamps.
Now, we need to solve for f. Then, by moving 0.34p to the right hand side, we have

and by dividing both sides by 0.49, we get

or equivalently

Now, we need to solve for p. Then, by moving 0.49f to the right hand side, we obtain

and by dividing both sides by 0.34, we get

Finally, we have that f=7 and we need to find p. In this regard, this last equation must help us. By substituting f=7, we have

which gives

By rounding up this result, the number of postcard stamp is 5.
In summary, the answers are
