Let one part be x.
Then according to question second part = 45 – x.
Then, according to question x = 3(45 – x) – 7
⇒ x = 135 – 3x – 7
⇒ x = – 3x + 135 – 7
⇒ x = – 3x + 128
⇒ x + 3x = 128
⇒ 4x = 128
⇒ x = 128/4
⇒ x = 32
Hence, one part = 32
Hence, second part = 45 – 32 = 13
Hence, the required part are 32 and 13.