Псевдокласс 4/22 :nth-last-child Решение 100%

ul:nth-last-child(2) li {
  background-color: #ff3300;
}

ul li:nth-last-child(2) {
  background-color: #339933;
}

ul:nth-last-child(2) > li:nth-last-child(2) {
 background-color: #0099ff;
}