Element doesn't matter when upgrading skill and it doesn't need to be same rarity. Higher rarity material will have add a higher success rate to skill up while the weapon you're trying to level up will require more the higher rarity it is.

And yes F and R in character menu is front and rear. Supposedly you get targeted less in the rear but the chances feel so minor it's a rather ignorable mechanic (until we get something like a boss overdrive only only the front row, if ever). The only order IMO to care about is setting them in a order to use their buffs better in auto battle.