A few suggestions when we have bag questions:
1) Tell us what kind of bag you have and whether or not it has wheels. (The dimensions given by manufacturers of bags are for the bag themselves and not the extra inch or two added for the wheels. A 22" bag with wheels is probably about 24-25 inches in reality.)
2) A backpack can be anything from a daybag, to an internal frame monster. Don't just say "backpack." Tell us the size.
3) If you buy a Rick Steves bag, be aware, the wheeled bag is not the convertible bag. And by saying you have "Rick Steves Bag" tells us nothing. Which model?
This may sound derogatory to some but we here are trying to help. The more information you give, the better we can help. And remember, while you can see the bag in front of you, we can't.
So, I hope you understand that when we get a question like this: "I have a carry-on bag and a backpack, can I take them both on the plane" is like asking "I have a Honda and a Toyota will they both fit in my garage?"