Which doctrine was formalised first: Infant Baptism or Original Sin? What I mean is something like this :

Case A, Original Sin came first
because all newly born baby are going to hell if they die in their infant age
then let's do Infant Baptism so they don't go to hell if the infant die.
(here, Infant Baptism start to exist after the Original Sin formulated).

Case B, Infant Baptism came first
because the church do Infant Baptism
Then it must be because all newly born baby will go to hell if the infant die.
(here, Original Sin formulated because the church do Infant Baptism).

Here is what I read from this link


  Pelagius promised infants who died unbaptised entry into “eternal
  life” (not, however, into the “Kingdom of God” [Jn 3:5]), reasoning
  that God would not condemn to hell those who were not personally
  guilty of sin


From the same link


  In countering Pelagius, Augustine was led to state that infants who
  die without Baptism are consigned to hell ---//cut--- Liturgical practice confirms the Church's belief that all inherit Adam's sin and must be transferred from the power of darkness into the kingdom of light


From reading those sentences (especially the bold one), my own conclusion is case-B. 
So, there is already an Infant Baptism ritual in that time.
Maybe Pelagius say "You don't need to baptize infant. If they die in their infant age, they won't go to hell". On the other hand, Augustine do not agree on what Pelagius say. In the pov of Augustine, Infant Baptism must be performed in order that if the infant die, the infant won't go to hell.

But since I'm not so sure, that's why I ask here.
Was Infant Baptism practiced before the development of the idea of Original Sin?

Ultimately it is not possible to historically know for with  any great amount of surety as the two seem to be based on very little historical documents as well as the interpretation on a few choice passages of Sacred Scripture. It does seem that the two developed at the same time. There is a definite relationship between infant baptism and original sin.

The Catholic Church believes that there is a biblical basis for baptizing infants to cleanse them for original sin. 


  
    And Peter said to them, "Repent, and be baptized every one of you in the name of Jesus Christ for the forgiveness of your sins; and you shall receive the gift of the Holy Spirit. For the promise is to you and to your children and to all that are far off, every one whom the Lord our God calls to him." And he testified with many other words and exhorted them, saying, "Save yourselves from this crooked generation." [Acts 2:38–40]
    
    We were buried therefore with him by baptism into death, so that as Christ was raised from the dead by the glory of the Father, we too might walk in newness of life. [Romans 6:4]
    
    God's patience waited in the days of Noah, during the building of the ark, in which a few, that is, eight persons, were saved through water. Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a clear conscience, through the resurrection of Jesus Christ. [1 Peter 3:20–21]
  
  
  The Catechism holds that infant baptism is "an immemorial tradition", practised from the earliest days of the Church recorded in Acts.
  
  
    1252 The practice of infant Baptism is an immemorial tradition of the Church. There is explicit testimony to this practice from the second century on, and it is quite possible that, from the beginning of the apostolic preaching, when whole "households" received baptism, infants may also have been baptized [Cf Acts 16:15, 33; Acts 18:8; 1 Cor 1:16] - What is the Biblical basis for the Catholic teaching that infant baptism cleanses from original sin?
  


"Seek forgiveness" goes on to add this to this very question.


  Furthermore Paul notes that baptism has replaced circumcision. 
  
  
    In Col. 2:11: In him you also were circumcised – not, however, with a circumcision performed by human hands, but by the removal of the fleshly body, that is, through the circumcision done by Christ. 2:12 Having been buried with him in baptism, you also have been raised with him through your faith in the power of God who raised him from the dead. 
  
  
  If Paul meant to exclude infants, he would not have chosen circumcision as a parallel for baptism. 
  
  Augustine also taught that,
  
  
    “It is this one Spirit who makes it possible for an infant to be regenerated ... when that infant is brought to baptism; and it is through this one Spirit that the infant so presented is reborn. For it is not written, ‘Unless a man be born again by the will of his parents’ or “ by the faith of those born again of water and the Holy Spirit’[John3:5]. The water, therefore manifesting exteriorly the sacrament of grace, and the Spirit effecting interiorly the benefit of grace, both regenerate in one Christ that man who is generated in Adam”(Letters 98:2) 
  
  
  Origen also wrote in the third century that 'according to the usage of Church, baptism is given even to infants'(Homilies on Leviticus, 8:3:11,AD 244). 
  
  The council of Carthage, in 253, condemned the opinion that baptism should be withheld from infants until the eight day after birth. 
  
  
    Later Augustine taught, 'The custom of Mother Church in baptising infants is certainly not to be scorned ....nor is to be believed that its tradition is anything except apostolic' (Literal Interpretation of Genesis 10:23:39, AD 408) - What is the Biblical basis for the Catholic teaching that infant baptism cleanses from original sin?
  


Original sin in Scripture


  The classical text is Romans 5:12 sqq. In the preceding part the apostle treats of justification by Jesus Christ, and to put in evidence the fact of His being the one Saviour, he contrasts with this Divine Head of mankind the human head who caused its ruin. The question of original sin, therefore, comes in only incidentally. St. Paul supposes the idea that the faithful have of it from his oral instructions, and he speaks of it to make them understand the work of Redemption. This explains the brevity of the development and the obscurity of some verses. Original Sin


Original sin in tradition


  On account of a superficial resemblance between the doctrine of original sin and the Manichaean theory of our nature being evil, the Pelagians accused the Catholics and St. Augustine of Manichaeism. For the accusation and its answer see "Contra duas epist. Pelag.", I, II, 4; V, 10; III, IX, 25; IV, III. In our own times this charge has been reiterated by several critics and historians of dogma who have been influenced by the fact that before his conversion St. Augustine was a Manichaean. They do not identify Manichaeism with the doctrine of original sin, but they say that St. Augustine, with the remains of his former Manichaean prejudices, created the doctrine of original sin unknown before his time. 
  
  It is not true that the doctrine of original sin does not appear in the works of the pre-Augustinian Fathers. On the contrary, their testimony is found in special works on the subject. Nor can it be said, as Harnack maintains, that St. Augustine himself acknowledges the absence of this doctrine in the writings of the Fathers. St. Augustine invokes the testimony of eleven Fathers, Greek as well as Latin (Contra Jul., II, x, 33). Baseless also is the assertion that before St. Augustine this doctrine was unknown to the Jews and to the Christians; as we have already shown, it was taught by St. Paul. It is found in the fourth Book of Esdras, a work written by a Jew in the first century after Christ and widely read by the Christians. This book represents Adam as the author of the fall of the human race (vii, 48), as having transmitted to all his posterity the permanent infirmity, the malignity, the bad seed of sin (iii, 21, 22; iv, 30). Protestants themselves admit the doctrine of original sin in this book and others of the same period (see Sanday, "The International Critical Commentary: Romans", 134, 137; Hastings, "A Dictionary of the Bible", I, 841). It is therefore impossible to make St. Augustine, who is of a much later date, the inventor of original sin. 
  
  That this doctrine existed in Christian tradition before St. Augustine's time is shown by the practice of the Church in the baptism of children. The Pelagians held that baptism was given to children, not to remit their sin, but to make them better, to give them supernatural life, to make them adoptive sons of God, and heirs to the Kingdom of Heaven (see St. Augustine, Of Sin and Merit I.18). The Catholics answered by citing the Nicene Creed, "Confiteor unum baptisma in remissionem peccatorum". - Original Sin


It seems the Early Church probably practiced infant baptism from apostolic times due to concept of original sin as it was understood at the time.

Related Questions:


  Has the term “born again” always been synonymous with baptism with the Christians of the Early Church?
  
  What is the earliest explicit mention of infant baptism?